Game video generation method and device, computer program product and electronic equipment
By responding to game engine events in real time, generating and rendering candidate shot clips corresponding to game assets, the problem of video content being disconnected from assets in game video generation is solved, achieving dynamic animation and editability, and improving the visual consistency and perceptual ability of game videos.
Patent Information
- Application Number
- CN202511686822.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-17
- Publication Date
- 2026-04-07
AI Technical Summary
Existing game video generation technologies suffer from issues such as video content being disconnected from game assets, lack of adjustability, and lack of editability and context awareness, resulting in static cutscenes that cannot be seamlessly integrated with player actions.
By acquiring game assets from the target game engine, responding to events in real time, identifying candidate shots and generating corresponding candidate shot clips, instantiating and rendering the game assets, generating the target game video, and supporting secondary editing within the engine.
It achieves seamless integration between game videos and the game world state, improves visual consistency, allows adjustments to the generated videos, and enhances the ability to perceive the game world state.
Smart Images

Figure CN121796907A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of computer technology, and in particular to a method and apparatus for generating game videos, computer program products, and electronic devices. Background Technology
[0002] In the modern video game industry, cinematic content, especially in-game cutscenes, has become a core element for enhancing the immersiveness of game narratives, shaping character images, conveying emotional impact, and attracting potential player groups.
[0003] With the rapid development of generative AI technology, especially large language models (LLM) and video generation models, some research has begun to explore the application of AI in film and television content creation. However, these general-purpose AI models have fundamental limitations when directly applied to the professional game industry. On the one hand, the generated cutscenes are linear and static; the cutscenes seen by players are consistent regardless of the equipment chosen or the plot choices made. On the other hand, the video content generated in these technologies is completely disconnected from the actual assets of the game. Furthermore, these technologies directly output video files, which cannot be adjusted further. Summary of the Invention
[0004] This disclosure provides a method for generating game videos, which at least partially solves the problems in related technologies where the video content generated in the game videos is disconnected from the game assets and the generated video files cannot be adjusted.
[0005] According to a first aspect of this disclosure, a method for generating game videos is provided, the method comprising: Acquire game assets included in the target game engine, respond to events of the target game engine in real time, and obtain the current state of the game based on the events; Based on the current state of the game, candidate shots corresponding to the current game state are determined, target game assets corresponding to the candidate shots are determined from the game assets, and candidate shot segments corresponding to the candidate shots are generated using the target game assets. Based on the candidate shot segments, a target shot segment sequence is determined, the target shot segments in the target shot segment sequence are instantiated to obtain a sequence file, and the sequence file is rendered to obtain the target game video.
[0006] According to a second aspect of this disclosure, a game video generation apparatus is provided, the apparatus comprising: The game asset traversal module is used to obtain game assets included in the target game engine, respond to events of the target game engine in real time, and obtain the current state of the game based on the events; The candidate shot fragment generation module is used to determine the candidate shot corresponding to the current game state based on the current game state, determine the target game asset in the game assets that corresponds to the candidate shot, and use the target game asset to generate the candidate shot fragment corresponding to the candidate shot. The game video generation module is used to determine the target shot segment sequence based on the candidate shot segments, instantiate the target shot segments in the target shot segment sequence to obtain a sequence file, and render the sequence file to obtain the target game video.
[0007] According to a third aspect of this disclosure, a computer program product is provided, including a computer program that, when executed by a processor, implements the method of the first aspect described above and possible implementations thereof.
[0008] According to a fourth aspect of this disclosure, an electronic device is provided, comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to perform the method of the first aspect and possible implementations thereof by executing the executable instructions.
[0009] This disclosure provides a method for generating game videos, which involves acquiring game assets included in a target game engine, responding to events of the target game engine in real time, and acquiring the current state of the game based on the events. Based on the current game state, candidate shots corresponding to the current game state are determined, and target game assets corresponding to the candidate shots are identified from the game assets. Candidate shot segments corresponding to the candidate shots are generated using the target game assets. A sequence of target shot segments is determined based on the candidate shot segments, and the target shot segments in the sequence are instantiated to obtain a sequence file. The sequence file is then rendered to obtain the target game video. On one hand, by responding to events of the target game engine in real time, acquiring the current game state based on the events, and determining candidate shots based on the current state, this method generates corresponding videos based on the internal state of the game, solving the problem of linear and static cutscenes in related technologies. This improves the perception of the game world state and generates dynamic animations that seamlessly connect with player behavior within the game. On the other hand, after determining candidate shots, the method uses game assets to generate candidate shot segments corresponding to the candidate shots. By directly calling resources in the game through a native asset-driven approach, the method ensures the visual consistency between the generated video content and the game itself. On the other hand, after determining the target shot segment, the target shot segment is instantiated to generate a sequence file. This sequence file can be edited in the engine, and the target game video can be adjusted through this secondary editing. Attached Figure Description
[0010] Figure 1 A flowchart illustrating a game video generation method in this exemplary embodiment is shown; Figure 2 This diagram illustrates a game video generation system according to this exemplary embodiment; Figure 3 This illustration shows a processing flowchart of a multimodal narrative intent parsing module in this exemplary embodiment; Figure 4 This illustration shows a processing flowchart of a dynamic cinematic storyboard generation module in this exemplary embodiment; Figure 5 This example implementation shows a processing flowchart of a player emotion-driven generative editing module. Figure 6 This diagram illustrates a block diagram of a game video generation apparatus according to this exemplary embodiment; Figure 7 A schematic diagram of the structure of an electronic device in this exemplary embodiment is shown. Detailed Implementation
[0011] Exemplary embodiments of this disclosure will be described more fully below with reference to the accompanying drawings.
[0012] The accompanying drawings are schematic illustrations of this disclosure and are not necessarily drawn to scale. Some block diagrams shown in the drawings may be functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities may be implemented in software, in hardware modules or integrated circuits, or in networks, processors, or microcontrollers. Implementations can be carried out in various forms and should not be construed as limited to the examples set forth herein. The features, structures, or characteristics described in this disclosure can be combined in any suitable manner in one or more embodiments. Numerous specific details are provided in the following description to give a thorough description of embodiments of this disclosure. However, those skilled in the art will recognize that one or more specific details may be omitted when implementing the technical solutions of this disclosure, or other methods, components, apparatuses, steps, etc., may be used to replace one or more specific details.
[0013] In the modern video game industry, cinematic content, especially in-game cinematics and promotional trailers, has become a core element in enhancing the immersion of game narratives, shaping character images, conveying emotional impact, and attracting potential players. This high-quality audiovisual content serves as a bridge connecting players to the game world and is crucial for game products to stand out in fierce market competition.
[0014] However, the current creation process of game and film content in the industry still relies heavily on the traditional labor-intensive model, facing many challenges: high production costs and long development cycles, fragmented creation processes and complex collaboration, difficulty in ensuring visual consistency with the game itself, the "one-off" nature of content creation and lack of dynamic adaptability, and slow response to market and player feedback.
[0015] In recent years, with the rapid development of generative AI technology, especially large language models (LLM) and video generation models, some research has begun to explore the application of AI in film and television content creation. A typical general-purpose AI film and television generation system can be roughly summarized into the following steps: 1. Script Generation and Parsing: The system receives text prompts input by the user and expands them into a detailed script containing multiple scenes and shots. The script describes the environment, character actions, and dialogue for each scene.
[0016] 2. Shot Description and Visual Elements: Another LLM or Multimodal Large Model (MLLM) receives the detailed script and breaks it down into a series of independent shot descriptions. For each shot, the model generates more specific visual cues.
[0017] 3. Single-shot video clip generation: The system inputs visual cues for each shot into one or more video generation models (such as models based on diffusion models or generative adversarial networks). Each model independently generates a short video clip (typically 2-4 seconds) that conforms to the text description. This process is entirely in pixel space, with the model "imagining" the content of the scene based on its knowledge learned from massive amounts of internet video data.
[0018] 4. Video Stitching and Audio Synthesis: The system stitches together all generated short video clips according to the script's order. Simultaneously, an audio generation model generates background music (BGM), ambient sound effects (Ambiance), sound effects (SFX), and voice-over based on the script content. Finally, the audio is combined with the stitched video to output a complete video file.
[0019] While such technological solutions conceptually demonstrate the potential for automated content creation, they suffer from the following fundamental and insurmountable flaws when applied to professional game development: Asset inconsistency: The video content generated by this solution is completely disconnected from the game's actual assets. Whether in terms of models, textures, or art style, it differs greatly from the characters and scenes meticulously designed by the game developers.
[0020] Lack of editability and controllability: The output is a "flat" MP4 video file, which game developers cannot modify or create further within the game engine.
[0021] Lack of context awareness: General AI models are unaware of the internal state of a game. They cannot achieve deep game context awareness.
[0022] The generalization of narrative pacing: Even when some advanced systems attempt to adjust editing pacing by simulating "audience feedback," this simulation is based on general film and television theories, rather than the emotional curves of a specific game's core gameplay and target player group. It cannot identify the "highlights" in a game that truly excite, suspense, or give players a sense of accomplishment, thus the resulting trailers may be bland and fail to resonate with core players.
[0023] The fallacy of physics and logic: Because generative models rely primarily on statistical correlations, their outputs may violate the physical laws or logical settings of a particular game world.
[0024] In view of the above problems, an exemplary embodiment of this disclosure provides a method for generating game videos. (See reference...) Figure 1 As shown, the game video generation method may include the following steps: Step S110: Obtain the game assets included in the target game engine, respond to the events of the target game engine in real time, and obtain the current state of the game based on the events; Step S120: Based on the current game state, determine the candidate shot corresponding to the current game state, determine the target game asset in the game assets that corresponds to the candidate shot, and use the target game asset to generate a candidate shot fragment corresponding to the candidate shot; Step S130: Determine the target shot sequence based on the candidate shot segments, instantiate the target shot segments in the target shot sequence to obtain a sequence file, render the sequence file to obtain the target game video.
[0025] In the aforementioned game video generation method, game assets included in the target game engine are acquired, events of the target game engine are responded to in real time, and the current game state is obtained based on the events. Based on the current game state, candidate shots corresponding to the current game state are determined, and target game assets corresponding to the candidate shots are identified from the game assets. Candidate shot segments corresponding to the candidate shots are generated using the target game assets. A sequence of target shot segments is determined based on the candidate shot segments, and the target shot segments in the sequence are instantiated to obtain a sequence file. The sequence file is then rendered to obtain the target game video. On one hand, by responding to events of the target game engine in real time, obtaining the current game state based on the events, and determining candidate shots based on the current state, the method generates corresponding videos based on the internal state of the game. This solves the problem of linear and static cutscenes in related technologies, improves the perception of the game world state, and generates dynamic animations that seamlessly connect with player behavior within the game. On the other hand, after determining the candidate shots, candidate shot segments corresponding to the candidate shots are generated using game assets. Through a native asset-driven approach, resources in the game are directly called, ensuring the visual consistency between the produced video content and the game itself. On the other hand, after determining the target shot segment, the target shot segment is instantiated to generate a sequence file. This sequence file can be edited in the engine, and the target game video can be adjusted through this secondary editing.
[0026] refer to Figure 2The following will explain and illustrate the game video generation system disclosed herein. The game video generation system includes a multimodal narrative intent parsing module, a game asset and context-aware module, a dynamic cinematic storyboard generation module, a player emotion-driven generative editing module, and an in-engine sequence generation and rendering module. The multimodal narrative intent parsing module is responsible for transforming the developer's input, which is typically vague and unstructured, creative requirements into precise mathematical and structured instructions that subsequent modules can understand and execute. The game asset and context-aware module serves as a bridge connecting the AI and the game world. It is responsible for understanding everything within the game engine in real time and in depth, ensuring that all AI decisions are based on real, usable elements within the game and can respond to dynamically changing game environments. The dynamic cinematic storyboard generation module receives narrative intent from the multimodal narrative intent parsing module and available assets / states from the game asset and context-aware module, generating a series of candidate shot clips that conform to cinematic aesthetics. The player-driven generative editing module selects and arranges a final sequence from a large number of candidate shots generated by the dynamic cinematic storyboard generation module, ensuring it matches the target emotional curve defined by the multimodal narrative intent analysis module to the greatest extent possible. The in-engine sequence generation and rendering module transforms the abstract "editing decision" into a concrete, operable sequence file within the game engine and controls the engine's rendering module to render the generated sequence offline as an MP4 video file.
[0027] The following will combine Figure 2 Further explanation and description of steps S110-S130 will be provided.
[0028] In step S110, the game assets included in the target game engine are obtained, the events of the target game engine are responded to in real time, and the current state of the game is obtained based on the events.
[0029] The target game engine can be either Unreal Engine or Unity; this example embodiment does not specifically limit the target game engine. The game video generation system can establish bidirectional communication with the target game engine through plugins or API bridges. Upon startup, a comprehensive asset scan and indexing will be performed. When generating shots for in-game cutscenes, the game asset and context-aware module will subscribe to the game engine's event system to obtain the current state of the game world in real time.
[0030] In one exemplary embodiment, after acquiring the game assets included in the target game engine, the method further includes: Traverse the asset catalog of the target game engine, identify and classify all game assets, record the path and key metadata of the game assets, and add semantic tags to the game assets; The path of the game asset and the key metadata are encoded, and an asset vector corresponding to the game asset is generated based on the encoded path of the game asset and the key metadata.
[0031] Specifically, the process involves traversing the project's asset catalog, such as Unreal Engine's Content Browser, to identify and categorize all game assets. For each game asset, not only is its path recorded, but key metadata is also extracted and automatically assigned semantic tags. For example, for an animation sequence, its duration and whether it's a looping animation are extracted, and its semantic tags are inferred by analyzing the animation curve or filename. After obtaining the game asset's path and key metadata, each game asset can be represented as a feature vector. , The `concat()` function is used to concatenate strings or arrays. It is a text encoder used to encode the name / path of an asset. It is a one-hot encoder that indicates the asset type. It is a vector containing key metadata about the asset (such as polygon count, animation duration, number of special effect particles, etc.). After converting each game asset into a feature vector, the feature vectors of all game assets can be used to construct an asset knowledge base that can be quickly retrieved. .
[0032] In this example embodiment, game assets may include: Static Meshes: scenes, buildings, props; Skeletal Meshes: characters, monsters, vehicles; Animation Sequences: running, jumping, attacking, and other actions associated with skeletal meshes; Levels / Scenes: containing asset layout and lighting information; Visual Effects (VFX Systems): particle effects defined by Niagara or Unity Particle System; Audio Files (Sound Waves / Cues): dialogue, sound effects, music. This example embodiment does not impose specific limitations on game assets. Through metadata extraction and tagging, massive amounts of game assets that are meaningless to machines are transformed into a structured, semantically rich knowledge base that AI can query and access at any time.
[0033] In one exemplary embodiment, the real-time response to events from the target game engine, and the acquisition of the current game state based on the events, includes: Subscribe to the event system of the game engine and respond in real time to events of virtual objects in the target game engine; The current state of the game is determined based on the virtual object's current world coordinates, rotation, movement speed, and key states.
[0034] Specifically, the game asset and context-aware module subscribes to the event system in the game engine, responds in real time to events of virtual objects in the target game engine, and determines the events based on the virtual object's current world coordinates. ), rotation ( ), movement speed ) and critical states ( Determine the current state of the game. The key states can be current health, current equipped equipment ID, current mission stage, etc., but in this example embodiment, no specific limitations are made on the key states.
[0035] In one exemplary embodiment, prior to acquiring the game assets included in the target game engine, the method further includes: In response to the data input operation, the input data corresponding to the input operation is fused based on the multimodal large model to obtain the narrative target vector and the target sentiment curve.
[0036] Specifically, the multimodal narrative intent parsing module responds to the user's data input operation, takes the input data corresponding to the user's input operation as the input of the multimodal big model, and performs fusion processing on the input data based on the multimodal big model to obtain the corresponding narrative target vector and target sentiment curve.
[0037] In one exemplary embodiment, the input data is at least one of natural language, visual reference, design document, and structured parameters; The response data input operation, based on a multimodal large model, fuses the input data corresponding to the input operation to obtain a narrative target vector and a target sentiment curve, including: The input data is encoded to obtain an encoding vector, and the encoding vector is fused to obtain a fused feature; Based on the fusion features, the narrative target vector and the target emotion curve are obtained.
[0038] Specifically, the input data can be natural language, visual references, design documents, and structured parameters. Natural language is the core instruction, for example, it can be to create a fast-paced battle highlight reel showcasing a new character's powerful combos and ultimate skills. Visual references are uploaded images, which can be character stills, scene atmosphere images, keyframe sketches, or movie screenshots, used to define the desired art style, color scheme, and composition preferences. Design documents can be game design documents or scripts. Structured parameters are used to constrain the generated target game video, and can be video length, target emotion, etc. In this example embodiment, the structured parameters are not specifically limited.
[0039] After obtaining the input data, it can be fed into a multimodal large-scale model. The encoder in the multimodal large-scale model encodes the input data to obtain an encoded vector. After obtaining the encoded vector, it can be fed into the fusion converter of the multimodal large-scale model. This fusion converter uses a cross-attention mechanism to capture the correlation between different modal information and outputs fused features. After obtaining the fusion features, the narrative target vector and the target sentiment curve can be obtained based on these features. For text encoders, For visual encoders, Text information extracted from natural language or design documents. For image purposes only.
[0040] When encoding input data, text input and documents can be converted into encoded vectors using a text encoder, while each image in the visual reference can be converted into an encoded vector using a visual encoder.
[0041] After obtaining the fusion features, they can be parsed to extract the core dimensions. These core dimensions can be the subject, core action or event, scene constraints, core intent, etc. The extracted core dimensions are then converted into vector components, and the narrative target vector is obtained based on these vector components. For the target sentiment curve, the core sentiment dimension of the curve can be determined based on the sentiment tendency in the fusion features. The sentiment intensity corresponding to the time point is extracted from the fusion features to form the keyframes of the curve. These keyframes are then connected to generate the target sentiment curve.
[0042] Narrative target vector output by multimodal large model It is a high-dimensional vector that quantifies vague creative intentions into a series of explicit instructions. Each dimension of the vector represents a specific narrative element. , Represents topic identification, Representing the core event, Key words representing style, Represents compositional preferences, Represents rhythm parameters. Target sentiment curve. It is a function that changes over time, defining the expected trend of changes in the intensity of emotions (such as excitement, tension, and emotion) experienced by the audience (players) during the viewing process. Where t represents the timeline and n represents the number of emotional peaks. Represents the intensity of the i-th emotional peak. This represents the time point when the i-th emotional peak occurs. This represents the duration or extent of influence of the i-th emotional peak. The multimodal large model determines this based on the input. , , The value of .
[0043] refer to Figure 3 The diagram illustrates the processing flow of the multimodal narrative intent parsing module. First, in response to data input operations, input data is fed into the multimodal large-scale model. This includes inputting natural language, design documents, and reference images. The text editor within the multimodal large-scale model encodes the natural language and design documents, while the visual encoder encodes the reference images. The outputs of both the text editor and the visual encoder are then input into the multimodal large-scale model's fusion converter to obtain fused features. Based on these fused features, the final output is a narrative target vector and a target sentiment curve.
[0044] In step S120, based on the current game state, candidate shots corresponding to the current game state are determined, target game assets corresponding to the candidate shots are determined among the game assets, and candidate shot segments corresponding to the candidate shots are generated using the target game assets.
[0045] Once the current state of the game is determined, a query can be performed in a preset camera language knowledge base to identify candidate shots corresponding to the current state. After obtaining the candidate shots, the game assets are searched using the candidate shots to identify the target game assets corresponding to the candidate shots, and the candidate shot fragments corresponding to the candidate shots are generated using the target game assets.
[0046] In one exemplary embodiment, determining the candidate shot corresponding to the current game state based on the current game state includes: Obtain a preset shot language knowledge base, which includes multiple shot paradigms; A query vector is generated based on the narrative target vector and the current state of the game. The similarity between the query vector and the shot paradigm is calculated. Based on the similarity, a candidate shot paradigm that matches the query vector is determined.
[0047] Specifically, a pre-defined knowledge base of camera language is acquired, which includes multiple camera paradigms. , This represents the context vector, which describes the situation in which this shot paradigm applies; The representative camera parameter template defines a set of camera behavior rules, including the offset range of the camera position relative to the character, the focal length range, the depth of field effect, etc. This represents animation call suggestions, recommending which types of animations are suitable for playing on virtual objects in this shot; This represents the desired special effects usage mode, and suggests special effects such as lens flare or motion blur. The representative evaluation data is used to assess the performance of this lens paradigm in historical use and is used for subsequent optimization.
[0048] When it is necessary to generate shots for a scene, firstly, based on the narrative target vector... and game status Construct a query vector , Using query vectors The process involves searching a knowledge base of shot language (using a typical Retrieval-Augmented Generation, RAG process) to identify the K most matching shot paradigms, which are then considered candidate shot paradigms. Calculating the similarity between the query vector and the shot paradigm can be achieved by comparing the query vector with the context vector of each entry in the shot language knowledge base. cosine similarity, .
[0049] In one exemplary embodiment, determining a target game asset among the game assets that corresponds to the candidate shot, and using the target game asset to generate a candidate shot fragment corresponding to the candidate shot, includes: The candidate shot paradigm is instantiated using the target game assets; Generate camera trajectory based on camera position, rotation angle, and field of view; The candidate shot fragments are generated based on the camera trajectory and the instantiated candidate shot paradigm.
[0050] Specifically, firstly, using target game assets, candidate shot paradigms are instantiated, replacing abstract elements in the shot paradigms with actual assets existing in the game. Secondly, camera trajectories are generated based on the camera position, camera rotation angle, and camera field of view. Furthermore, dynamic and visual effects can be added to the candidate shots, and specific, executable candidate shot fragments can be generated using the camera trajectories and the instantiated candidate shot paradigms.
[0051] After obtaining the candidate shot segments corresponding to each candidate shot paradigm, all candidate shot segments can be integrated to output a set of candidate shot segments.
[0052] In one exemplary embodiment, generating the camera trajectory based on the camera position, rotation angle, and field of view includes: Based on the candidate shot paradigm and the current game state, determine the target control point, generate a spline based on the target control point, and determine the camera position based on the spline; The camera rotation angle is controlled according to the candidate shot paradigm; The field of view of the camera is determined based on the narrative target vector and the target emotion curve; The camera trajectory is determined based on the camera position, the rotation angle, and the field of view.
[0053] Specifically, the camera position Position(t) is typically defined using parametric spline curves (such as Catmull-Rom splines) to ensure smooth motion. The optimal control point can be calculated based on candidate shot paradigms and the positions of virtual objects in the current game state. , , , Splines are generated based on the optimal control points, where the splines either pass through... , The camera position is determined based on the spline.
[0054]
[0055] Where t represents time.
[0056] The camera rotation angle can be determined based on the candidate shot paradigm. For example, if the candidate shot paradigm is "epic landscape display", the camera rotation angle will be determined as a linear or ease-in / ease-out function from 30° to 60°. If the candidate shot paradigm is "dizziness", the camera rotation angle will be determined as 15°, and small high-frequency random perturbations will be added to the yaw and pitch angles.
[0057] The camera's field of view can be determined based on the narrative target vector and the target emotional curve. For example, if the user input is: "Give the female protagonist a close-up to show her inner sadness," the AI decision-making system will retrieve the "sad close-up" shot paradigm. This shot paradigm will strongly recommend using a telephoto lens (low FOV), such as FOV=25, which can blur the background and focus all visual weight on the female protagonist's subtle expressions, allowing the audience to get closer to her inner world.
[0058] Determine the camera location Rotation angle and field of vision Then, the camera's motion trajectory is determined based on the camera's position, rotation angle, and field of view. .
[0059] The following will combine Figure 4 The implementation process of the dynamic cinematic storyboard generation module is further explained and illustrated. Specifically, firstly, a query vector is constructed based on the narrative target vector and the target emotion curve. This query vector is then used to search the camera language knowledge base to obtain candidate shot paradigms. These candidate shot paradigms are then instantiated using game assets. The camera's motion trajectory in the time dimension is defined, and dynamic effects and visual effects are added to the candidate shot paradigms to obtain candidate shot fragments corresponding to the paradigms. Finally, these candidate shot fragments are integrated to obtain a set of candidate shot fragments.
[0060] In step S130, a target shot sequence is determined based on the candidate shot segments, the target shot segments in the target shot sequence are instantiated to obtain a sequence file, and the sequence file is rendered to obtain the target game video.
[0061] After obtaining candidate shot clips, you can select and rearrange them to form a final sequence, thus obtaining a sequence file.
[0062] In one exemplary embodiment, determining the target shot sequence based on the candidate shot segments includes: Calculate the first correlation between the candidate shot fragment and the narrative target vector, and filter and sort the candidate shot fragments according to the first correlation to obtain the target shot fragment sequence.
[0063] Specifically, the first correlation between candidate shot segments and narrative target vector can be calculated, and the candidate shot segments can be filtered and sorted based on the first correlation to obtain the target shot segment sequence.
[0064] In one exemplary embodiment, calculating a first correlation between the candidate shot fragment and the narrative target vector, and filtering and sorting the candidate shot fragments based on the first correlation to obtain the target shot fragment sequence includes: Acquire player game data, input the player game data into a preset model, and obtain the player excitement level corresponding to the player game data; Based on the player's excitement level and the narrative target vector, a first correlation is determined with the candidate shot segment; Obtain the shot type and motion speed corresponding to the candidate shot segment, and determine the emotional contribution value of the candidate shot segment; Based on the emotional contribution value and the first correlation, the candidate shot segments are screened and sorted to obtain the target shot segment sequence.
[0065] Specifically, after acquiring player game data, this data can be input into a pre-trained model, which assigns a player excitement header to each game moment. After obtaining the player excitement level corresponding to each player's game data, candidate shot segments can be evaluated based on player excitement and the narrative goal vector to obtain the first correlation between the candidate shot segments and the narrative goal and player excitement. Furthermore, for each candidate shot segment, the emotional intensity it evokes can be evaluated; that is, the emotional contribution value of the candidate shot segment can be determined based on its corresponding shot type, movement speed, etc. After obtaining the emotional contribution value and the first correlation of the candidate shots, the candidate shot segments can be filtered and sorted based on these values to obtain the target shot segment sequence.
[0066] Among them, player game data is , For timestamps, The event type can include player death, defeating a boss, unlocking achievements, etc. This example implementation does not specifically limit the event type. For event data, It is a flexible, structured data container (usually in JSON format) that describes the specific details of an event, providing... It provides rich and precise contextual information. Player excitement level. ,in, Represents game events, Represents the frequency of game events. This represents the popularity of social media shares related to gaming events. This represents the average time players spend in the relevant area. The sentiment polarity score of the text describing the event. A text string representing the time description. These are learnable weights. The first correlation can be represented as... , , which is a weighting coefficient used to balance the narrative objective vector and player excitement.
[0067] In one exemplary embodiment, determining the target shot segment based on the emotional contribution value and the first correlation includes: The objective function is determined based on the emotional contribution value of the candidate shot segments and the target emotional curve. A target shot sequence is determined from the candidate shot segments according to the objective function; wherein, based on the emotional contribution value of the candidate shot segments, a first emotional curve of the target shot sequence is determined, and the first emotional curve matches the target emotional curve.
[0068] Specifically, determining the target sequence of shot segments from candidate shot segments can be modeled as a combinatorial optimization problem. The objective is to select and arrange a subset of the candidate shot segments such that the sentiment curve of this sequence best matches the target sentiment curve. First, the objective function is determined based on the sentiment contribution values of the candidate shot segments and the target sentiment curve. The sentiment contribution value of the candidate shot segments can be expressed as... ,in, Let be the start time of the i-th candidate shot segment. For attenuation term, The emotional contribution value for each candidate shot segment. The objective function can be expressed as: ,in, These are weights used to balance curve fitting and content relevance. This represents the first relevance. After obtaining the objective function, heuristic algorithms such as genetic algorithms or beam search can be used to find an approximate optimal solution, that is, to determine the sequence of target shot segments from the candidate shot segments. The first sentiment curve corresponding to the sentiment contribution value of the target shot segments included in the target shot segment sequence matches the target sentiment curve.
[0069] In one exemplary embodiment, when using a genetic algorithm to determine the target shot fragment, the process includes: 1. Initialization: Randomly generating N shot sequences as an initial population. 2. Evaluation: Calculating the "fitness" of each sequence according to the objective function described above. 3. Selection: Selecting superior sequences based on their fitness. 4. Crossover: Swapping some shots from two sequences to generate new offspring sequences. 5. Mutation: Randomly replacing, adding, or deleting a shot from a sequence. 6. Iteration: Repeating steps 2-5 until a sequence that meets the conditions is found or the maximum number of iterations is reached.
[0070] The following will combine Figure 5 This section further explains and clarifies the player emotion-driven generative editing module. It acquires and quantifies player game data to determine player excitement levels. Based on this excitement, candidate shot segments are evaluated to obtain first relevance and emotional contribution values. Shots are randomly selected and sorted from the candidate segments, generating multiple initial shot sequences—essentially a population in a genetic algorithm. Each sequence corresponds to an individual, and the target emotional curve guides the initialization direction. A fitness score is calculated for each shot sequence individual in the population (determining whether the individual is worth keeping). The score is based on two core indicators: emotional fit: the similarity between the actual emotional curve of the sequence and the target emotional curve (higher fit, higher score); and overall quality score: the sum of the content scores of all shots in the sequence (considering content quality to avoid solely pursuing emotion while ignoring the quality of the shots themselves). Simulating biological evolution logic, the population is screened and updated to generate the next generation: selection: sequences with high fitness scores are retained, while sequences with low scores are eliminated; crossover: candidate shot segments from two high-fitness sequences are exchanged to generate a new sequence; mutation: 1-2 candidate shot segments in a sequence are randomly modified to prevent the population from getting trapped in local optima. After the iteration stops, the sequence of shots with the highest fitness score in the population is the optimal solution. The optimal solution is then transformed into an executable sequence of target shot segments for use in subsequent video generation, game cutscenes, and other scenarios.
[0071] In one exemplary embodiment, the step of instantiating the target shot segment in the target shot segment sequence to obtain a sequence file, and rendering the sequence file to obtain the target game video includes: Create a sequence asset, iterate through the target shot fragment, and instantiate the target shot fragment into the sequence asset; Based on the sequence assets, the sequence file is obtained, and the sequence file is rendered to obtain the target game video.
[0072] Specifically, a new sequence asset is created using the engine API, such as a Level Sequence in Unreal Engine or a Timeline in Unity. Then, each target shot in the target shot sequence is iterated over, and each shot is instantiated into the sequence asset. After obtaining the sequence asset, it can be saved to the project's Content directory to obtain a sequence file. This sequence file is fully editable. Developers can edit it like any manually created sequence, dragging keyframes, replacing animations, adjusting shot durations, etc. After obtaining the sequence file, it can be rendered to obtain the target game video.
[0073] In one exemplary embodiment, creating a sequence asset, traversing the target shot fragment, and instantiating the target shot fragment into the sequence asset includes: Generate a camera track and mark the start and end times of the target shot segment within the camera track; A virtual camera is created for each target shot segment, the virtual camera is bound to the main camera track of the time period corresponding to the target shot segment, and the target shot segment is applied to the virtual camera; Add animation tracks to virtual objects and add event tracks at specified time points.
[0074] Specifically, add a camera cuts track, marking the start and end times of each target shot on the timeline. Add and bind a master camera: create a corresponding virtual camera actor for each target shot and bind it to the master camera track for that time period. Apply camera motion: apply the camera track synthesized for the target shot by the dynamic cinematic storyboard generation module. Apply this to the corresponding virtual camera, writing its position, rotation, and field of view properties as keyframes. Add character animation tracks: Add animation tracks to the involved virtual objects in the sequence, and trigger the animation sequence suggested by the dynamic cinematic storyboard generation module at the correct time points. Add effects and audio tracks: Add event tracks at specified times to trigger corresponding visual effects (VFX) and audio files.
[0075] In one exemplary embodiment, after obtaining the sequence file, the method further includes: Adjust one or more of the keyframes, animations, and shot durations in the sequence file.
[0076] Specifically, after generating the sequence file, one or more of the keyframes, animations, and shot durations of the sequence file can be adjusted in the engine.
[0077] In one exemplary embodiment, rendering the sequence file to obtain the target game video includes: The sequence file is rendered offline to generate a video file, and the video file is identified as the target game video.
[0078] Specifically, after obtaining the sequence file, you can also control the engine's rendering module to perform offline rendering of the sequence file to obtain the target game video.
[0079] In one exemplary embodiment, cutscenes and game promotional trailers can be generated according to the above-described game video generation method. However, it should be noted that when generating game promotional trailers using the above method, it is not necessary to obtain the current game state. Instead, candidate shots can be filtered based on user input, candidate shot segments can be generated, and a sequence of target shot segments can be obtained based on the candidate shot segments. The target shot segments in the sequence of target shot segments can be instantiated to obtain a sequence file, and the sequence file can be rendered to obtain the game promotional trailer.
[0080] The following will provide further explanation and clarification on the generation of game promotional trailers.
[0081] The core content of Game 1 includes: a new character class A, a new map B, and a final raid boss. A 60-second promotional trailer needs to be created to generate significant buzz and anticipation within the player community.
[0082] 1. Input stage: Natural Language: "Create a 60-second epic trailer for Game 1. Start by showcasing the grandeur of the new map, focus on the exhilarating combat between the new character class A and the mobs in the middle, and culminate in a breathtaking scene of multiple players teaming up to fight the final boss. End with a close-up of the new character class A. The overall pace should be fast and the atmosphere should be electrifying!"
[0083] Visual references: Upload several character design sketches for the new character class A, concept art for the new map B, and screenshots from some classic fantasy movies.
[0084] Player data: Player data from the game's beta testing phase is accessed by the system.
[0085] 2. Analysis and Perception: The multimodal narrative intent parsing module parses the input and generates... (Main body: New character class A, final raid boss; Events: Combat, skill casting; Style: Epic, fast-paced) and (An emotional curve with two main peaks, corresponding to the battle and the boss battle respectively).
[0086] The game assets and context-aware module scanned the game project, indexing all models and animations for the new character class A, the models and animations for the final raid boss, and the level files for the new map B.
[0087] 3. Storyboarding and Editing: The player-driven generative editing module analyzed player data and found that players had the highest discussion interest in the new character class A's first skill (high damage, visually stunning) and the final raid boss's second skill. These events generated excitement scores. It was significantly improved.
[0088] The dynamic cinematic storyboard generation module is based on Together with the asset library, hundreds of candidate shot clips were generated.
[0089] The genetic algorithm of the player-emotion-driven generative editing module begins to work. It recognizes that the first skill of the new character class A and the second skill of the final raid boss are high-scoring content, prioritizing the placement of clips containing these elements into the sequence. Simultaneously, it strives to arrange the sequence so that the overall emotional flow aligns with... match.
[0090] 4. Generation and Output: The system creates a Level Sequence file named Trailer_Dragonblight_v1.uasset in Unreal Engine.
[0091] It automatically arranges the camera, animation, VFX, and sound effects of the final 35 selected shot clips on the timeline.
[0092] After obtaining the editable sequence file, if you feel that the close-up angle of the new character class A at the end could be a little more angled, you can directly drag the camera position in the engine, click render, and generate the promotional trailer.
[0093] The following section will provide a further explanation and description of how to generate cutscenes.
[0094] Background: In the open-world game 2, there's a key plot point: the player's first encounter with the villain. The villain awaits the player in an abandoned throne room. Players can enter this throne room through three different entrances: the main entrance (the regular route), a secret passage on the left (the stealth route), and falling through the skylight (the exploration route).
[0095] 1. Input stage: Natural Language: Input: Generate a dynamic cutscene for the "Meet the Villain" scene. The total duration is approximately 45 seconds. The core objective is to convey the villain's imposing presence and mystique. Different opening shots must be generated based on the player's entry point (entry_point variables: main_door, secret_path, rooftop) to achieve a seamless transition.
[0096] Design document: Describes the villain's personality (arrogance, composure) and the layout of the throne room.
[0097] 2. Triggers and Perception: The trigger for the player to enter the throne room has been activated.
[0098] The game assets and context-aware module immediately obtains the current game state. This includes the value of the key variable entry_point, as well as the player's precise world coordinates and orientation.
[0099] 3. Dynamic storyboarding and generation: The dynamic cinematic storyboard generation module receives the instruction and constructs a query vector Q, which includes the key variable entry_point.
[0100] If entry_point == main_door: Retrieve a shot paradigm from the camera language knowledge base that matches contexts such as "formal meeting" and "symmetrical composition". It will generate an opening shot that smoothly zooms out from behind the player (third-person game perspective) and then switches to the front of the throne, showing the entire hall in a symmetrical wide-angle shot.
[0101] If entry_point == secret_path: The query vector contains keywords such as stealth and spying. The system will retrieve paradigms such as over-the-shoulder spy shots and handheld shaky shots. The generated opening will be a slightly shaky shot that follows the player, slowly emerging from the shadows of a secret passage, focusing on the villain in the distance to create tension.
[0102] If entry_point == rooftop: The query vector contains keywords such as falling, chaos, and looking up. It will generate a rapidly falling, dive-down shot, then switch to a low-angle, slightly tilted shot (Dutch angle) to show the player's dizziness upon falling and the villain's commanding view from above.
[0103] Regardless of the opening sequence, subsequent shots (such as close-ups of villains, dialogue shots, etc.) are shared, but the system will automatically calculate and adjust the transitions between shots to ensure smoothness.
[0104] 4. Real-time generation: The entire generation process is completed instantly in the background. The moment players enter the throne room, they see a cinematic cutscene that perfectly matches their actions, without any black screens or loading.
[0105] In one exemplary embodiment, the game video generation method provided by this exemplary embodiment has at least the following advantages: Firstly, it responds to events of the target game engine in real time, obtains the current state of the game based on the events, and determines candidate shots based on the current state. This enables the generation of corresponding videos based on the internal state of the game, solving the problem that cutscenes in related technologies are linear and static, improving the perception of the game world state, and generating dynamic animations that seamlessly connect with player behavior within the game. Secondly, after determining candidate shots, it uses game assets to generate candidate shot fragments corresponding to the candidate shots. Through a native asset-driven approach, it directly calls resources in the game, ensuring the visual consistency between the produced video content and the game itself. Thirdly, after determining the target shot fragment, it instantiates the target shot fragment to generate a sequence file. This sequence file can be further edited in the engine, allowing for adjustments to the target game video through this secondary editing.
[0106] Exemplary embodiments of this disclosure also provide a game video generation apparatus, with reference to Figure 6 As shown, it includes: The game asset traversal module 610 is used to obtain game assets included in the target game engine, respond to events of the target game engine in real time, and obtain the current state of the game based on the events; The candidate shot fragment generation module 620 is used to determine the candidate shot corresponding to the current game state based on the current game state, determine the target game asset in the game assets that corresponds to the candidate shot, and generate the candidate shot fragment corresponding to the candidate shot using the target game asset. The game video generation module 630 is used to determine a target shot segment sequence based on the candidate shot segments, instantiate the target shot segments in the target shot segment sequence to obtain a sequence file, and render the sequence file to obtain a target game video.
[0107] In one exemplary embodiment, the game asset traversal module includes: The game asset traversal module is used to traverse the asset catalog of the target game engine, identify and classify all game assets, record the path and key metadata of the game assets, and add semantic tags to the game assets. The asset vector generation module is used to encode the path of the game asset and the key metadata, and generate an asset vector corresponding to the game asset based on the encoded path and key metadata.
[0108] In one exemplary embodiment, the game asset traversal module includes: The event subscription module is used to subscribe to the event system of the game engine and respond to events of virtual objects in the target game engine in real time; The game state determination module is used to determine the current game state based on the virtual object's current world coordinates, rotation, movement speed, and key states.
[0109] In one exemplary embodiment, the game asset traversal module includes: The data receiving module is used to respond to data input operations and perform fusion processing on the input data corresponding to the input operation based on a multimodal large model to obtain the narrative target vector and the target sentiment curve.
[0110] In one exemplary embodiment, the input data is at least one of natural language, visual reference, design document, and structured parameters; The data receiving module includes: The feature fusion module is used to encode the input data to obtain an encoding vector, and to fuse the encoding vector to obtain fused features; The large model processing module is used to obtain the narrative target vector and the target sentiment curve based on the fusion features.
[0111] In one exemplary embodiment, the candidate shot fragment generation module includes: The lens knowledge base acquisition module is used to acquire a preset lens language knowledge base, which includes multiple lens paradigms. The matching module is used to generate a query vector based on the narrative target vector and the current state of the game, calculate the similarity between the query vector and the shot paradigm, and determine the candidate shot paradigm that matches the query vector based on the similarity.
[0112] In one exemplary embodiment, the candidate shot fragment generation module includes: Shot instantiation is used to instantiate the candidate shot paradigm using the target game asset; The camera trajectory determination module is used to generate the camera trajectory based on the camera position, rotation angle, and field of view. The candidate shot fragment generation module is used to generate the candidate shot fragment based on the camera trajectory and the instantiated candidate shot paradigm.
[0113] In one exemplary embodiment, the candidate shot fragment generation module includes: The camera position determination module is used to determine a target control point based on the candidate shot paradigm and the current state of the game, generate a spline based on the target control point, and determine the camera position based on the spline. A rotation angle determination module is used to control the rotation angle of the camera according to the candidate shot paradigm; The field of view determination module is used to determine the field of view of the camera based on the narrative target vector and the target emotion curve; The camera trajectory determination module is used to determine the camera trajectory based on the camera position, the rotation angle, and the field of view.
[0114] In one exemplary embodiment, the game video generation module includes: The first correlation determination module is used to calculate the first correlation between the candidate shot fragment and the narrative target vector, and to filter and sort the candidate shot fragments according to the first correlation to obtain the target shot fragment sequence.
[0115] In one exemplary embodiment, the first correlation determination module includes: The player excitement level determination module is used to acquire player game data, input the player game data into a preset model, and obtain the player excitement level corresponding to the player game data. The first correlation calculation module is used to determine the first correlation between the player's excitement level and the narrative target vector and the candidate shot segment. The emotional contribution value calculation module is used to obtain the shot type and motion speed corresponding to the candidate shot segment, and determine the emotional contribution value of the candidate shot segment. The target shot segment sequence determination module is used to filter and sort the candidate shot segments according to the emotional contribution value and the first correlation to obtain the target shot segment sequence.
[0116] In one exemplary embodiment, the target shot sequence determination module includes: The objective function determination module is used to determine the objective function based on the emotional contribution value of the candidate shot segment and the target emotional curve; A shot sorting module is used to determine a target shot sequence from the candidate shot segments according to the objective function; wherein, based on the emotional contribution value of the candidate shot segments, a first emotional curve of the target shot sequence is determined, and the first emotional curve matches the target emotional curve.
[0117] In one exemplary embodiment, the game video generation module includes: The sequence asset creation module is used to create sequence assets, traverse the target shot fragments, and instantiate the target shot fragments into the sequence assets; The sequence file generation module is used to obtain the sequence file based on the sequence asset, render the sequence file, and obtain the target game video.
[0118] In one exemplary embodiment, the sequence asset creation module includes: A camera track adding module is used to generate a camera track and mark the start and end time points of the target shot segment in the camera track; The main camera binding module is used to create a virtual camera for each target shot segment, bind the virtual camera to the main camera track of the time period corresponding to the target shot segment, and apply the target shot segment to the virtual camera; The animation track adding module is used to add animation tracks to virtual objects and add event tracks at specified time points.
[0119] In one exemplary embodiment, the game video generation module includes: The sequence file adjustment module is used to adjust one or more of the keyframes, animations, and shot durations in the sequence file.
[0120] In one exemplary embodiment, the game video generation module includes: The sequence file rendering module is used to perform offline rendering of the sequence file, generate a video file, and identify the video file as the target game video.
[0121] The specific details of each part of the above-mentioned device have been described in detail in the method section of the implementation plan. For any undisclosed details, please refer to the implementation plan of the method section, and therefore will not be repeated here.
[0122] It should be noted that although several modules or units for the device used to perform actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to exemplary embodiments of this disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.
[0123] Furthermore, although the steps of the method in this invention are described in a specific order in the accompanying drawings, this does not require or imply that the steps must be performed in that specific order, or that all the steps shown must be performed to achieve the desired result. Additional or alternative steps may be omitted, multiple steps may be combined into one step, and / or a step may be broken down into multiple steps.
[0124] In an exemplary embodiment of the present invention, an electronic device capable of implementing the above-described method is also provided. The electronic device may include a processor and a memory. The memory stores executable instructions of the processor, such as a computer program. The processor executes the executable instructions to perform the method steps of various exemplary embodiments of the present disclosure. Furthermore, the electronic device may also include a display for displaying a graphical user interface.
[0125] Those skilled in the art will understand that various aspects of the present invention can be implemented as systems, methods, or program products. Therefore, various aspects of the present invention can be specifically implemented in the following forms: entirely in hardware, entirely in software (including firmware, microcode, etc.), or in a combination of hardware and software, collectively referred to herein as “circuit,” “module,” or “system.”
[0126] The following reference Figure 7 To describe an electronic device 700 according to this embodiment of the present invention. Figure 7 The electronic device 700 shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of the present invention.
[0127] like Figure 7 As shown, the electronic device 700 is manifested in the form of a general-purpose computing device. The components of the electronic device 700 may include, but are not limited to: at least one processing unit 710, at least one storage unit 720, a bus 730 connecting different system components (including storage unit 720 and processing unit 710), and a display unit 740.
[0128] The storage unit stores program code that can be executed by the processing unit 710, causing the processing unit 710 to perform the steps described in the "Exemplary Methods" section of this specification according to various exemplary embodiments of the present invention. For example, the processing unit 710 can perform actions such as... Figure 1Step S110: Obtain game assets included in the target game engine, respond to events of the target game engine in real time, and obtain the current game state based on the events; Step S120: Determine candidate shots corresponding to the current game state according to the current game state, determine the target game assets corresponding to the candidate shots among the game assets, and generate candidate shot segments corresponding to the candidate shots using the target game assets; Step S130: Determine the target shot segment sequence based on the candidate shot segments, instantiate the target shot segments in the target shot segment sequence to obtain a sequence file, and render the sequence file to obtain the target game video.
[0129] Storage unit 720 may include readable media in the form of volatile storage units, such as random access memory (RAM) 7201 and / or cache memory 7202, and may further include read-only memory (ROM) 7203.
[0130] The storage unit 720 may also include a program / utility 7204 having a set (at least one) program module 7205, such program module 7205 including but not limited to: an operating system, one or more application programs, other program modules and program data, each or some combination of these examples may include an implementation of a network environment.
[0131] Bus 730 can represent one or more of several types of bus structures, including a memory cell bus or memory cell controller, a peripheral bus, a graphics acceleration port, a processing unit, or a local bus using any of the various bus structures.
[0132] Electronic device 700 can also communicate with one or more external devices 800 (e.g., keyboard, pointing device, Bluetooth device, etc.), and with one or more devices that enable a user to interact with electronic device 700, and / or with any device that enables electronic device 700 to communicate with one or more other computing devices (e.g., router, modem, etc.). This communication can be performed via input / output (I / O) interface 750. Furthermore, electronic device 700 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 760. As shown, network adapter 760 communicates with other modules of electronic device 700 via bus 730. It should be understood that, although not shown in the figures, other hardware and / or software modules can be used in conjunction with electronic device 700, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID (Redundant Arrays of Independent Disks) systems, tape drives, and data backup storage systems.
[0133] Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of the present invention can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, portable hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, terminal device, or network device, etc.) to execute the method according to the embodiments of the present invention.
[0134] In exemplary embodiments of the present invention, a computer-readable storage medium is also provided, on which a program product capable of implementing the methods described above is stored. In some possible embodiments, various aspects of the present invention may also be implemented as a program product comprising program code that, when the program product is run on a terminal device, causes the terminal device to perform the steps of the various exemplary embodiments of the present invention described in the "Exemplary Methods" section above.
[0135] According to embodiments of the present invention, a program product for implementing the above-described method may employ a portable compact disc read-only memory (CD-ROM) and include program code, and may run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited thereto. In this document, a readable storage medium may be any tangible medium containing or storing a program that may be used by or in conjunction with an instruction execution system, apparatus, or device.
[0136] The program product may employ any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0137] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable signal medium may also be any readable medium other than a readable storage medium, capable of sending, propagating, or transmitting programs for use by or in conjunction with an instruction execution system, apparatus, or device.
[0138] The program code contained on the readable medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical fiber, RF (Radio Frequency), etc., or any suitable combination thereof.
[0139] Program code for performing the operations of this invention can be written in any combination of one or more programming languages, including object-oriented programming languages such as Java and C++, and conventional procedural programming languages such as C or similar languages. The program code can execute entirely on the user's computing device, partially on the user's device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0140] Furthermore, the above figures are merely illustrative of the processes included in the method according to exemplary embodiments of the present invention, and are not intended to be limiting. It is readily understood that the processes shown in the above figures do not indicate or limit the temporal order of these processes. Additionally, it is readily understood that these processes may be executed synchronously or asynchronously, for example, in multiple modules.
[0141] Other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and practice of the invention described herein. This application is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not invented herein. The specification and embodiments are to be considered exemplary only, and the true scope and spirit of the invention are indicated by the claims.
Claims
1. A method for generating game videos, characterized in that, include: Acquire game assets included in the target game engine, respond to events of the target game engine in real time, and obtain the current state of the game based on the events; Based on the current state of the game, candidate shots corresponding to the current game state are determined, target game assets corresponding to the candidate shots are determined from the game assets, and candidate shot segments corresponding to the candidate shots are generated using the target game assets. Based on the candidate shot segments, a target shot segment sequence is determined, the target shot segments in the target shot segment sequence are instantiated to obtain a sequence file, and the sequence file is rendered to obtain the target game video.
2. The method according to claim 1, characterized in that, After acquiring the game assets included in the target game engine, the method further includes: Traverse the asset catalog of the target game engine, identify and classify all game assets, record the path and key metadata of the game assets, and add semantic tags to the game assets; The path of the game asset and the key metadata are encoded, and an asset vector corresponding to the game asset is generated based on the encoded path of the game asset and the key metadata.
3. The method according to claim 1, characterized in that, The real-time response to events from the target game engine, and the acquisition of the current game state based on these events, include: Subscribe to the event system of the game engine and respond in real time to events of virtual objects in the target game engine; The current state of the game is determined based on the virtual object's current world coordinates, rotation, movement speed, and key states.
4. The method according to claim 1, characterized in that, Prior to acquiring the game assets included in the target game engine, the method further includes: In response to the data input operation, the input data corresponding to the input operation is fused based on the multimodal large model to obtain the narrative target vector and the target sentiment curve.
5. The method according to claim 4, characterized in that, The input data is at least one of natural language, visual reference, design document, and structured parameters; In response to data input operations, the input data corresponding to the input operation is fused based on a multimodal large model to obtain a narrative target vector and a target sentiment curve, including: The input data is encoded to obtain an encoding vector, and the encoding vector is fused to obtain a fused feature; Based on the fusion features, the narrative target vector and the target emotion curve are obtained.
6. The method according to claim 4, characterized in that, The step of determining the candidate shot corresponding to the current game state based on the current game state includes: Obtain a preset shot language knowledge base, which includes multiple shot paradigms; A query vector is generated based on the narrative target vector and the current state of the game. The similarity between the query vector and the shot paradigm is calculated. Based on the similarity, a candidate shot paradigm that matches the query vector is determined.
7. The method according to claim 6, characterized in that, The step of determining the target game asset corresponding to the candidate shot from the game assets, and using the target game asset to generate a candidate shot fragment corresponding to the candidate shot, includes: The candidate shot paradigm is instantiated using the target game assets; Generate camera trajectory based on camera position, rotation angle, and field of view; The candidate shot fragments are generated based on the camera trajectory and the instantiated candidate shot paradigm.
8. The method according to claim 7, characterized in that, The process of generating a camera trajectory based on the camera position, rotation angle, and field of view includes: Based on the candidate shot paradigm and the current game state, determine the target control point, generate a spline based on the target control point, and determine the camera position based on the spline; The camera rotation angle is controlled according to the candidate shot paradigm; The field of view of the camera is determined based on the narrative target vector and the target emotion curve; The camera trajectory is determined based on the camera position, the rotation angle, and the field of view.
9. The method according to claim 4, characterized in that, The step of determining the target shot sequence based on the candidate shot segments includes: Calculate the first correlation between the candidate shot fragment and the narrative target vector, and filter and sort the candidate shot fragments according to the first correlation to obtain the target shot fragment sequence.
10. The method according to claim 9, characterized in that, The step of calculating the first correlation between the candidate shot fragments and the narrative target vector, and filtering and sorting the candidate shot fragments based on the first correlation to obtain the target shot fragment sequence includes: Acquire player game data, input the player game data into a preset model, and obtain the player excitement level corresponding to the player game data; Based on the player's excitement level and the narrative target vector, a first correlation is determined with the candidate shot segment; Obtain the shot type and motion speed corresponding to the candidate shot segment, and determine the emotional contribution value of the candidate shot segment; Based on the emotional contribution value and the first correlation, the candidate shot segments are screened and sorted to obtain the target shot segment sequence.
11. The method according to claim 10, characterized in that, The step of filtering and sorting the candidate shot segments based on the emotional contribution value and the first correlation to obtain the target shot segment sequence includes: The objective function is determined based on the emotional contribution value of the candidate shot segments and the target emotional curve. A target shot sequence is determined from the candidate shot segments according to the objective function; wherein, based on the emotional contribution value of the candidate shot segments, a first emotional curve of the target shot sequence is determined, and the first emotional curve matches the target emotional curve.
12. The method according to claim 1, characterized in that, The process of instantiating the target shot segment in the target shot segment sequence to obtain a sequence file, and rendering the sequence file to obtain the target game video includes: Create a sequence asset, iterate through the target shot fragment, and instantiate the target shot fragment into the sequence asset; Based on the sequence assets, the sequence file is obtained, and the sequence file is rendered to obtain the target game video.
13. The method according to claim 12, characterized in that, The process of creating a sequence asset, traversing the target shot fragment, and instantiating the target shot fragment into the sequence asset includes: Generate a camera track and mark the start and end times of the target shot segment within the camera track; A virtual camera is created for each target shot segment, the virtual camera is bound to the main camera track of the time period corresponding to the target shot segment, and the target shot segment is applied to the virtual camera; Add animation tracks to virtual objects and add event tracks at specified time points.
14. The method according to claim 12, characterized in that, After obtaining the sequence file, the method further includes: Adjust one or more of the keyframes, animations, and shot durations in the sequence file.
15. The method according to claim 12, characterized in that, The process of rendering the sequence file to obtain the target game video includes: The sequence file is rendered offline to generate a video file, and the video file is identified as the target game video.
16. A game video generation device, characterized in that, include: The game asset traversal module is used to obtain game assets included in the target game engine, respond to events of the target game engine in real time, and obtain the current state of the game based on the events; The candidate shot fragment generation module is used to determine the candidate shot corresponding to the current game state based on the current game state, determine the target game asset in the game assets that corresponds to the candidate shot, and use the target game asset to generate the candidate shot fragment corresponding to the candidate shot. The game video generation module is used to determine the target shot segment sequence based on the candidate shot segments, instantiate the target shot segments in the target shot segment sequence to obtain a sequence file, and render the sequence file to obtain the target game video.
17. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the method according to any one of claims 1 to 15.
18. An electronic device, characterized in that, include: processor; Memory for storing the executable instructions of the processor; The processor is configured to execute the method of any one of claims 1 to 15 by executing the executable instructions.