Method for dynamic generation of region upgrade animation and related device
Patent Information
- Application Number
- CN202611161790.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-31
- Publication Date
- 2026-10-16
AI Technical Summary
[0004]本申请的目的旨在至少能解决上述的技术缺陷之一,特别是现有技术中由于动画生成方式较为固定,导致动画视觉展示多样化程度较低的技术缺陷
[0085] This application provides a method and related equipment for dynamically generating regional upgrade animations. Upon responding to a request to generate an upgrade animation for a target region, the method first acquires regional attribute information, including region type and area, and determines a corresponding target upgrade style template based on the region type. Then, it selects corresponding animation components to generate an initial upgrade animation, enabling different region types to be displayed using different animation styles and components. This achieves a correlation and matching between the animation generation process and the region type, thus reflecting the characteristic differences of different regions. Furthermore, the method determines animation scale and rhythm parameters based on the region area, and adjusts the initial upgrade animation using these parameters to adapt the animation's display scale and playback rhythm to the target region, thereby achieving dynamic adjustment of the upgrade animation. By having both region type and area participate in the upgrade animation generation process, the generated target upgrade animation can be differentiated for different regional characteristics, improving the diversity of the animation's visual presentation.
Smart Images

Figure CN122929032A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of game technology, and in particular to a method and related equipment for dynamically generating area upgrade animations. Background Technology
[0002] With the development of technologies such as games, virtual scenes, and digital twins, regional upgrade animations are widely used in the process of building upgrades, facility renovations, and scene evolution to intuitively display changes in the state of a region and enhance the user's interactive experience and visual presentation.
[0003] In existing technologies, area upgrade animations typically employ fixed animation generation schemes, pre-configuring the same animation resources and playback methods. During area upgrades, the corresponding animations are directly invoked for display. For example, in game scenes, building upgrades usually only play preset animations of building demolition, construction, or appearance changes, making it difficult to adaptively adjust the animation content according to changes in the actual scene. Due to the relatively fixed animation generation methods, the diversity of animation visual presentation is low. Summary of the Invention
[0004] The purpose of this application is to at least solve one of the aforementioned technical defects, particularly the technical defect in the prior art where the animation generation method is relatively fixed, resulting in a low degree of diversity in the visual display of animation.
[0005] Firstly, this application provides a method for dynamically generating regional upgrade animations, the method comprising:
[0006] In response to the upgrade animation generation request for the target area, obtain the regional attribute information of the target area, which includes at least the area and the type of the area;
[0007] Match the target upgrade style template corresponding to the region type, and select the corresponding animation component based on the target upgrade style template to generate the initial upgrade animation;
[0008] Based on the area, determine the animation scale parameters and animation rhythm parameters;
[0009] Based on the animation scale and rhythm parameters, the initial upgrade animation is adjusted to generate the target upgrade animation.
[0010] Optionally, determine the target upgrade style template corresponding to the region type, including:
[0011] Obtain the regional spatial feature information of the target area;
[0012] Based on the region type, obtain the corresponding set of target templates;
[0013] Based on the regional spatial feature information, the corresponding target upgrade style template is matched from the target template set.
[0014] Optionally, based on regional spatial feature information, a corresponding target upgrade style template is matched from the target template set, including:
[0015] Extract spatial feature parameters from regional spatial feature information;
[0016] Calculate the matching degree between each upgraded style template in the target template set and the spatial feature parameters;
[0017] The upgrade style template that meets the preset matching conditions will be used as the corresponding target upgrade style template.
[0018] Optionally, based on the target upgrade style template, select the corresponding animation component to generate an initial upgrade animation, including:
[0019] Based on the component layout rules in the target upgrade style template, select the corresponding animation component from the preset component library;
[0020] Based on the component layout rules, analyze the spatial and hierarchical relationships between the animation components;
[0021] Based on the animation splicing rules in the upgraded style template, determine the dependencies and timing order between each animation component;
[0022] Based on spatial relationships, hierarchical relationships, dependencies, and temporal arrangements, the animation components are combined to generate the initial upgrade animation.
[0023] Optionally, based on spatial relationships, hierarchical relationships, dependency relationships, and temporal arrangement relationships, the animation components are combined to generate an initial upgrade animation, including:
[0024] Map the spatial relationships to the spatial coordinates of each animation component within the target area;
[0025] Convert the hierarchical relationship into the rendering hierarchy of each animation component;
[0026] Based on the dependencies, construct a directed acyclic graph (DAG) between the animation components, and generate the execution time window for each animation component according to the DAG and the time arrangement order.
[0027] Based on spatial coordinates, rendering level, and execution time window, the animation components are combined to generate the initial upgrade animation.
[0028] Optionally, based on the area of the region, determine the animation scale parameters and animation rhythm parameters, including:
[0029] Determine the area level corresponding to the region's area;
[0030] Obtain the baseline scale parameters corresponding to the area level, and adjust the baseline scale parameters according to the deviation between the area of the region and the area range corresponding to the area level to obtain the animation scale parameters;
[0031] Obtain the rhythm configuration template corresponding to the area level, and generate animation rhythm parameters based on the rhythm configuration template.
[0032] Optionally, the baseline scale parameters are adjusted based on the deviation between the region area and the area range corresponding to the area level to obtain the animation scale parameters, including:
[0033] Obtain the area range corresponding to the area level;
[0034] Calculate the area difference between the region area and the lower limit of the area range, and calculate the area correction ratio based on the area difference;
[0035] Based on the area correction ratio, the spatial expansion range in the baseline scale parameters is adjusted to obtain the animation scale parameters.
[0036] Optionally, based on the rhythm configuration template, animation rhythm parameters are generated, including:
[0037] Obtain the time mapping curve corresponding to the rhythm configuration template;
[0038] Based on the time mapping curve, determine the actual playback time axis positions corresponding to multiple key positions on the standardized time axis, and obtain multiple speed curve control points;
[0039] Based on multiple speed curve control points, determine the playback speed coefficient corresponding to each animation stage;
[0040] Animation rhythm parameters are generated based on the speed curve control points and various playback speed coefficients.
[0041] Optionally, the initial upgrade animation is adjusted based on animation scale parameters and animation rhythm parameters to generate the target upgrade animation, including:
[0042] Based on the animation scale parameters, the spatial coordinates of each animation component in the initial upgrade animation are adjusted to obtain the target spatial position of each animation component;
[0043] Based on the animation rhythm parameters, adjust the execution time window corresponding to each animation component in the initial upgrade animation to obtain the target playback sequence for each animation component;
[0044] Generate target upgrade animation based on target spatial location and target playback sequence.
[0045] Optionally, based on the animation scale parameters, the spatial coordinates corresponding to each animation component in the initial upgrade animation are adjusted to obtain the target spatial position corresponding to each animation component, including:
[0046] Get the spatial expansion range from the animation scale parameter;
[0047] Based on the spatial coordinates of each animation component in the initial upgrade animation, determine the direction vector of each animation component relative to the center of the target area;
[0048] Based on the spatial expansion range, the vectors of each direction are scaled to obtain the target offset of each animation component;
[0049] Calculate the target spatial position of each animation component based on the target offset.
[0050] Optionally, based on the animation rhythm parameters, the execution time window corresponding to each animation component in the initial upgrade animation is adjusted to obtain the target playback sequence corresponding to each animation component, including:
[0051] Based on the speed curve control points in the animation rhythm parameters and the playback speed coefficients corresponding to each animation stage, a time mapping relationship between the standardized time axis and the actual playback time axis is constructed.
[0052] Based on the time mapping relationship, the execution time window corresponding to each animation component is mapped to the actual playback timeline to obtain the target execution time window corresponding to each animation component;
[0053] Generate the target playback sequence based on the execution time window of each target.
[0054] Optionally, the method further includes:
[0055] Obtain environmental status information corresponding to the target area;
[0056] Based on the environmental status information, determine the corresponding environmental adjustment parameters and environmental adaptation elements;
[0057] Adjust the animation elements in the target upgrade animation according to the environmental adjustment parameters, and update the target upgrade animation according to the environmental adaptation elements.
[0058] Optionally, based on the environmental status information, the corresponding environmental adjustment parameters and environmental adaptation elements are determined, including:
[0059] Based on the environmental status information, match the corresponding environmental adjustment strategy from the preset environmental strategy library;
[0060] Based on the environmental adjustment strategy, determine the parameter adjustment rules and environmental adaptation rules;
[0061] Based on the parameter adjustment rules, determine the environment adjustment parameters corresponding to the animation elements in the target upgrade animation;
[0062] Based on the environment adaptation rules, determine the environment adaptation elements corresponding to the target upgrade animation.
[0063] Optionally, the method further includes:
[0064] Determine the corresponding NPC behavior-driven strategy based on the region type;
[0065] Obtain the current status information of NPCs associated with the target area;
[0066] Generate corresponding behavior control instructions based on the NPC behavior-driven strategy and current state information;
[0067] Based on behavior control instructions, drive NPCs to perform target behaviors that are synchronized with the target upgrade animation.
[0068] Optionally, the method further includes:
[0069] Get the media files uploaded by the user;
[0070] Parse the source files and extract the corresponding visual style data;
[0071] Based on the visual style data, the visual style parameters corresponding to at least one animation component in the upgraded style template are adjusted to obtain the updated upgraded style template.
[0072] Optionally, the method further includes:
[0073] Get the animation display parameters input by the user;
[0074] Determine the corresponding animation quality configuration based on the animation display parameters;
[0075] Analyze the animation quality configuration and adjust the animation scale parameters, animation rhythm parameters, and / or animation rendering parameters of the target upgrade animation; among them, the animation rendering parameters are used to change the rendering precision of the target upgrade animation.
[0076] Secondly, this application provides a dynamic generation apparatus for regional upgrade animation, the apparatus comprising:
[0077] The regional attribute information acquisition module is used to acquire the regional attribute information of the target region in response to the upgrade animation generation request of the target region. The regional attribute information includes at least the region area and the region type.
[0078] The initial upgrade animation generation module is used to determine the target upgrade style template corresponding to the region type, and select the corresponding animation components based on the target upgrade style template to generate the initial upgrade animation;
[0079] The animation parameter determination module is used to determine the animation scale parameters and animation rhythm parameters based on the area of the region.
[0080] The target upgrade animation generation module is used to adjust the initial upgrade animation based on the animation scale parameters and animation rhythm parameters, and generate the target upgrade animation.
[0081] Thirdly, this application provides a storage medium storing computer-readable instructions that, when executed by one or more processors, cause the one or more processors to perform the steps of the dynamic generation method for any of the region upgrade animations described in the above embodiments.
[0082] Fourthly, this application provides a computer device, including: one or more processors, and a memory;
[0083] The memory stores computer-readable instructions that, when executed by one or more processors, perform the steps of the dynamic generation method for any of the region upgrade animations described in the above embodiments.
[0084] As can be seen from the above technical solutions, the embodiments of this application have the following advantages:
[0085] This application provides a method and related equipment for dynamically generating regional upgrade animations. Upon responding to a request to generate an upgrade animation for a target region, the method first acquires regional attribute information, including region type and area, and determines a corresponding target upgrade style template based on the region type. Then, it selects corresponding animation components to generate an initial upgrade animation, enabling different region types to be displayed using different animation styles and components. This achieves a correlation and matching between the animation generation process and the region type, thus reflecting the characteristic differences of different regions. Furthermore, the method determines animation scale and rhythm parameters based on the region area, and adjusts the initial upgrade animation using these parameters to adapt the animation's display scale and playback rhythm to the target region, thereby achieving dynamic adjustment of the upgrade animation. By having both region type and area participate in the upgrade animation generation process, the generated target upgrade animation can be differentiated for different regional characteristics, improving the diversity of the animation's visual presentation. Attached Figure Description
[0086] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0087] Figure 1 This is a schematic diagram of the application architecture provided for an embodiment of this application;
[0088] Figure 2 A flowchart illustrating the dynamic generation method for regional upgrade animation provided in this application embodiment;
[0089] Figure 3 A game user interface diagram showing area selection provided in this application embodiment;
[0090] Figure 4 The game user interface diagrams provided for the upgrade preview and confirmation in the embodiments of this application;
[0091] Figure 5 A game user interface diagram adapted to rainy weather environment elements provided in the embodiments of this application;
[0092] Figure 6 A schematic diagram of the structure of the dynamic generation device for regional upgrade animation provided in the embodiments of this application;
[0093] Figure 7 This is a schematic diagram of the internal structure of a computer device provided in an embodiment of this application. Detailed Implementation
[0094] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0095] Before describing the specific implementation process of this application, we will first describe its application environment. Please refer to [link / reference needed]. Figure 1 , Figure 1 This is a schematic diagram of the application architecture provided for an embodiment of this application; Figure 1The application architecture includes server 110 and client 120. Server 110 can be of various types, such as a game server, map service server, or application server. It can be used to store regional data, manage regional upgrade status, execute logical operations for generating upgrade animations, and distribute animation resource packages. Server 110 can be a standalone physical server, a server cluster composed of multiple physical servers, or a distributed system. It can also be a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. Client 120 can be a terminal device such as a smartphone, tablet, personal computer, smart TV, in-vehicle terminal, or head-mounted display device. Players or users interact with the system through the graphical user interface of client 120, such as triggering regional upgrade operations, viewing the playback effect of upgrade animations, and making regional management decisions. Server 110 and client 120 establish a communication connection through the network to realize real-time transmission and synchronization of data and animation resources. For example, client 120 sends a region upgrade request to server 110, and server 110 returns the configuration parameters of the upgrade animation or directly pushes the generated animation data.
[0096] It is understood that the above-mentioned method for dynamically generating regional upgrade animations can run on personal mobile terminals, on server 110, or on third-party devices to provide regional upgrade animation generation services. The specific method for dynamically generating regional upgrade animations can run as a program on the above-mentioned devices, or as a system component of the above-mentioned devices, or as a cloud service program. The specific operating mode depends on the actual scenario and is not limited here.
[0097] The specific implementation methods of this application will be described in detail below. For ease of understanding, examples will be given in the context of simulation management games or city building games. However, the technical solution of this application is not limited to these scenarios.
[0098] Understandably, simulation management games and city-building games are important branches of video games. Players take on roles such as city managers or territory lords, promoting regional development through planning, layout, and resource allocation. These games encompass diverse scenarios, including city building, territory expansion, park planning, and island development. Among these, the region, as the core functional unit within the game's virtual environment, has its level upgrades and visual evolution serving as key indicators of the player's management progress. The region's upgrade animations can intuitively present the state transitions of that unit, thereby enhancing the accuracy of visual feedback and the recognizability of regional features.
[0099] In the aforementioned types of games, a region refers to a land unit or functional area within the game's virtual scene that can be acquired, managed, and upgraded by players, such as city blocks, farmlands, industrial parks, and commercial core areas. Different types of regions correspond to different functional orientations and visual styles; residential areas present a lifelike scene, industrial areas a mechanical style, and commercial areas a modern urban style. The initial appearance of a region is usually a basic level form, and its visual expression will change in stages as the region level increases. These changes are reflected in multiple dimensions such as building density, number of landmarks, dynamic effects, and color saturation. However, existing technologies typically use fixed generation schemes for region upgrade animations, pre-configuring uniform animation resources and playback methods. When a region is upgraded, the preset animation is directly called for display, such as only playing general building appearance changes or light effect flashing animations, making it difficult to adapt to the region type and area characteristics. This fixed mode results in a lack of stylistic differentiation in upgrade animations for different regions. Small areas may appear cluttered due to excessive special effects, while large areas may appear visually empty due to insufficient coverage.
[0100] Furthermore, this application establishes a dynamic generation mechanism for regional upgrade animations within the game. Under this mechanism, after responding to a target region's upgrade animation generation request, the system first obtains regional attribute information, including region type and area. Based on the region type, it matches the corresponding target upgrade style template; for example, an industrial area matches an energy flow and metallic texture template, while a residential area matches a natural growth and soft lighting effect template. This allows the selection of corresponding animation components to generate an initial upgrade animation, ensuring the animation style aligns with the region's functional positioning. On this basis, animation scale parameters, such as element size, effect coverage, and particle count, are determined according to the region area, as well as animation rhythm parameters, such as playback duration, easing curve, and rate of change. These two parameters are then used to finely adjust the initial upgrade animation in both spatial and temporal dimensions, ultimately generating a target upgrade animation adapted to the region's area. This dual-dimensional adaptation method ensures both the differentiation of animation styles through region type and the rationality of animation display width and rhythm through region area. It automatically generates upgrade animations matching various regions without requiring manual configuration, effectively improving the consistency of upgrade visual presentation and scene adaptation accuracy.
[0101] In one embodiment, such as Figure 2 As shown, this application provides a method for dynamically generating regional upgrade animations, which may include the following steps:
[0102] S110: In response to the upgrade animation generation request of the target area, obtain the regional attribute information of the target area, which includes at least the area and the type of the area.
[0103] In this step, the user interacts with the game system through the graphical user interface of client 120. When the user selects a target area in the interface and performs an upgrade operation, a request to generate an upgrade animation for that target area is triggered. For example... Figure 3 As shown, users can select the target plot to be upgraded in the global isometric map interface. The selected plot is marked with a highlighted outline, and an operation prompt bubble with the word "Upgrade" pops up above the plot, intuitively presenting the interactive entry point for the upgrade operation. Specifically, the upgrade operation can be initiated by clicking the "Upgrade" button in the area details panel, confirming the upgrade command in the area construction menu, or by the system automatically initiating an upgrade process when the area's experience points reach the upgrade threshold. After receiving the user's upgrade operation, client 120 generates an upgrade animation generation request containing the target area identifier and sends it to server 110.
[0104] After receiving the request, server 110 reads the target region's attribute information from the region data storage module based on the region identifier carried in the request. The region attribute information includes at least two dimensions: region area and region type. The region area represents the spatial coverage of the region in the game's virtual scene. Its specific value can be a preset hierarchical area level, such as a small region corresponding to 4×4 grid units, a medium region to 6×6 grid units, and a large region to 8×8 grid units. Alternatively, it can be a precise virtual spatial coordinate range, such as a horizontal span of 120 virtual units and a vertical span of 80 virtual units. This area data is determined and persistently stored in the server database when the region is first created, and is updated synchronously with subsequent region expansions or mergers. The region type represents the region's functional positioning and visual theme affiliation in the game, such as a residential region, industrial region, commercial region, cultural region, or agricultural region. The region type is usually determined by the system during region initialization based on the player's selected location or the region's planned purpose, or it can be manually specified by the player from the available types during the region creation phase.
[0105] Understandably, the regional attribute information in this application is the core input parameter for generating differentiated upgrade animations. Different types of regions have natural differences in visual style: residential regions are more suited to a warm, soft, and naturally growing visual language when upgrading; industrial regions tend to favor mechanical transmission, energy pulses, and metallic textures; and commercial regions are better suited to a dazzling and bustling urban style. Without differentiation based on region type, playing the same animation for all regions during upgrades would lead to a convergence of visual styles across different functional areas, weakening the distinctiveness and differentiated characteristics between regions.
[0106] Area size, as another core attribute dimension, directly affects the spatial adaptability of upgrade animations. This area can be obtained by calculating the length and width fields from the area configuration data. For example, if a player owns an area called "West City Industrial Park" in the game, and the system records its length as 80 virtual units and its width as 60 virtual units, the area is the product of these two values. For larger areas, if the animation elements are too small or the effects don't cover enough, the upgrade animation will be visually diluted by the background, failing to create sufficient visual impact. Conversely, for smaller areas, if the animation elements are too large or the particle effects are too dense, it will cause screen congestion, interfering with the player's observation of the area's layout. Therefore, the area area data needs to be accurately obtained and transmitted to the subsequent animation parameter determination stage to ensure that the generated upgrade animation is appropriately displayed in space.
[0107] Therefore, this step, by jointly obtaining the two core dimensions of region type and region area, provides a precise input basis for the differentiated generation of subsequent upgraded animations. This enables the animation generation process to bind the spatial and visual attributes of the region from the source, avoiding the drawback of traditional solutions where all regions share the same animation generation logic due to a lack of perception of regional characteristics.
[0108] In practical implementation, server 110 can further obtain other auxiliary attribute information of the area, such as the current level of the area, the number of unlocked decorations in the area, and the building density in the area. These auxiliary attributes can serve as supplementary references for subsequent selection of animation components and parameter adjustment. When sending the upgrade animation generation request, client 120 can also carry the viewport information of the current graphical user interface, such as the viewport scaling ratio and the visible area range, so that the animation parameters returned by server 110 can be further adapted to the current display environment and improve the visual comfort of animation playback.
[0109] After receiving confirmation of the regional attribute information returned by the server 110, the client 120 can provide feedback on the regional identification results to the player in the graphical user interface through methods such as highlighting the regional outline and displaying attribute labels. For example, a text prompt such as "Residential Area - Medium Size" can be displayed floating above the region to let the player know that the current region upgrade animation will be generated according to this attribute combination, increasing the transparency and anticipation of the operation.
[0110] S120: Match the target upgrade style template corresponding to the region type, and select the corresponding animation component based on the target upgrade style template to generate the initial upgrade animation.
[0111] In this step, after obtaining the region type of the target region, server 110 matches the target upgrade style template corresponding to that region type from the style template library. The style template library is pre-stored in the configuration storage module of server 110, and it maintains the mapping relationship between region types and upgrade style templates. Each region type corresponds to an independent style template, which defines the overall visual tone that the upgrade animation of that type of region should follow, including the color system, lighting atmosphere, particle effect style, transition methods, and selection rules for auxiliary decorative elements. For example, the template matched for residential areas is the "Natural Growth Template," which uses warm colors as the main theme, soft and warm lighting, and particle effects such as scattered petals or light spots. The transitions use a smooth gradient. The template matched for industrial areas is the "Energy Pulse Template," which uses cool colors and metallic colors as the main theme, emphasizes contrast and impact in lighting, uses electric arcs or energy ripples in particle effects, and uses rapid cuts and vibration effects in transitions. The template matched for commercial areas is the "Prosperous Gathering Template," which uses gold and flowing light as the main theme, bright and dazzling lighting, uses starbursts or flowing light lines in particle effects, and uses a radial expansion method in transitions.
[0112] After determining the target upgrade style template, server 110 further selects corresponding animation components from the animation component library according to the component combination rules defined in the template, and combines them to generate the initial upgrade animation. The animation component library stores a variety of reusable basic animation units, which are organized according to functional categories, including but not limited to: area base animation components, used to present the dynamic changes of the area's ground or base during the upgrade process; boundary light effect components, used to generate surrounding flowing light and shadow effects at the edge of the area; landmark highlighting components, used to show the special visual emphasis of the core buildings or landmarks in the area during the upgrade; particle scattering components, used to generate various scattered, rising, or spreading particle effects; overlay masking components, used to achieve overall tone transitions or brightness pulses during the upgrade process; and identifier emergence components, used to display the dynamic appearance effect of the area name, level number, or exclusive badge. Each animation component has a configurable attribute interface, including color values, size multipliers, playback speed coefficients, transparency curves, particle quantity multipliers, etc.
[0113] Understandably, the mapping between region types and upgrade style templates is based on the functional positioning and visual perception differences of different regions in the game. Upgrades for residential regions emphasize growth and prosperity, and their corresponding templates lean towards a natural, warm, and slow-paced visual style; upgrades for industrial regions emphasize production capacity and technological advancement, and their corresponding templates lean towards a robust, powerful, and fast-paced visual style; upgrades for commercial regions emphasize wealth and agglomeration effects, and their corresponding templates lean towards a magnificent, expansive, and ceremonial visual style. Through this mapping from type to template, different regions can be given differentiated visual tones during the generation process, preventing a convergence of visual appearances during upgrades.
[0114] Through this template matching and component combination mechanism, the upgrade animation acquires a visual gene that is bound to the functional positioning of the area from the initial generation stage. The animations of different area types are naturally distinguished in terms of color system, lighting atmosphere, particle style and transition method, so that the area upgrade feedback is no longer monotonous, but can convey the unique upgrade value of different types of areas from the visual tone level, effectively improving the visual recognition and regional feature expression of the upgrade animation.
[0115] In practical implementation, style templates can also adopt a hierarchical configuration structure. Under the top-level template corresponding to each region type, sub-templates can be further refined according to the region level. For example, for residential regions, levels 1 to 3 use the "Natural Growth Template - Basic", levels 4 to 6 use the "Natural Growth Template - Intermediate", and levels 7 and above use the "Natural Growth Template - Advanced". The different levels of templates gradually progress in terms of particle richness, lighting effect complexity, and animation duration, so that the same type of region can present a clear visual evolution at different upgrade stages. When matching the target upgrade style template, in addition to the main dimension of region type, server 110 can also combine the current level of the region as an auxiliary matching condition to select a more accurate template version.
[0116] After the animation components are selected, server 110 combines the components according to the preset hierarchical order, spatial layout, and temporal arrangement in the template to generate a complete initial upgrade animation description file. This description file contains information such as the type identifier, spatial coordinates, appearance time, duration, default attribute parameters, and dependencies between components. After this step is completed, client 120 receives template matching result confirmation information returned by server 110, which is displayed on the graphical user interface through the style identifier of the region type. For example, the name of the target style template and the corresponding atmosphere illustration are displayed in the region upgrade preview pop-up, indicating the visual tone direction of the current upgrade animation to the player.
[0117] S130: Determine the animation scale parameters and animation rhythm parameters based on the area.
[0118] In this step, after obtaining the area of the target region, server 110 uses it as the core input parameter and determines the animation scale and rhythm parameters corresponding to the upgrade animation of that region through a preset area-parameter mapping rule. The animation scale parameter is used to control the display area of the upgrade animation in the spatial dimension, and it includes, but is not limited to, the following sub-parameters: the size multiple of each animation component, used to enlarge or reduce the component elements as a whole; the emission multiple of particle effects, used to control the total number of particles generated per unit time; the effect coverage radius multiple, used to control the diffusion range of light effects, ripples and other effects in the scene; and the texture tiling scale of the region's base animation, used to ensure that the texture resolution and density of the ground dynamic effect remain visually coordinated in different area regions. Animation rhythm parameters are used to control the playback rhythm of the upgrade animation in the time dimension. Specifically, they include, but are not limited to, the following sub-parameters: total animation playback duration, which determines the complete time span of the upgrade animation from start to finish; time offset of each component, which adjusts the staggered and layered feel between different animation elements; easing curve type, which controls the motion characteristics of the animation in the start, acceleration, deceleration and end phases; particle emission rate and life cycle ratio, which affect the activity density and decay speed of particles per unit time.
[0119] In practical implementation, the animation scale parameters are determined by calculating the ratio of the region area to the reference area. Server 110 has a preset reference area value, which corresponds to a default set of animation scale parameter configurations: component size multiplier is 1.0, particle number multiplier is 1.0, and coverage radius multiplier is 1.0. When the obtained target region area is larger than the reference area, the scale parameters are enlarged accordingly based on the area ratio; when the target region area is smaller than the reference area, the scale parameters are reduced accordingly based on the area ratio. To avoid visual distortion in extreme area cases, server 110 can set upper and lower thresholds for the scale parameters, such as an upper limit of 2.5 times for the size multiplier and a lower limit of 0.4 times. For example, if the base area is set to 36 grid units and the actual area of a residential area is 64 grid units, with an area ratio of approximately 1.78, then server 110 determines the component size multiple, particle number multiple, and coverage radius multiple of this area to be 1.8 times, so that the upgrade animation can form sufficient visual coverage density in a larger area and avoid empty screen.
[0120] The animation rhythm parameters can be determined by adopting the design principle that the larger the area, the slower the rhythm, and the smaller the area, the faster the rhythm. Server 110 has a preset baseline rhythm configuration, including a baseline playback duration of 4 seconds, a baseline particle lifespan of 2 seconds, and a baseline easing curve of ease-out type. When the area increases, server 110 extends the total playback duration and appropriately slows down the particle movement speed, allowing the animation sufficient time to unfold layer by layer in large areas, creating a grand and orderly visual progression. When the area decreases, server 110 shortens the total playback duration and accelerates the particle movement speed, allowing the animation to complete quickly in small areas, avoiding a dragging feeling caused by excessively long playback times. In specific implementation, the baseline playback duration can be adjusted using an area normalization coefficient. For example, playback duration = baseline duration × area adjustment factor, where the area adjustment factor can be dynamically selected within the range of 0.6 to 1.8. Meanwhile, the time offset between components can also be adjusted positively with the area. The larger the area, the greater the interval between the appearance of different components, thereby increasing the richness of the animation layers; the smaller the area, the more synchronous the components appear, maintaining the compactness and cleanliness of the animation.
[0121] Furthermore, when determining the animation rhythm parameters, server 110 can also consider the current level of the region as an auxiliary factor. A higher-level region upgrade signifies a more significant state transition, and its animation rhythm can be appropriately slowed down to emphasize the ceremonial aspect of the upgrade. Therefore, given the same area, the playback duration for a higher-level region will be slightly longer than that for a lower-level region. This auxiliary factor is incorporated into the rhythm parameter calculation by adding a level correction coefficient, further refining the determination of the animation rhythm beyond just area dominance.
[0122] By using area-driven scale and rhythm parameter mapping, this step enables the display area and playback rhythm of the upgraded animation to adaptively adjust with the area, effectively avoiding the problem of visual clutter caused by excessive special effects in small areas, as well as the problem of visual thinness caused by insufficient coverage in large areas. This provides a parameter basis that is precisely matched with spatial attributes for subsequent fine-tuning of the animation.
[0123] S140: Adjust the initial upgrade animation based on the animation scale parameters and animation rhythm parameters to generate the target upgrade animation.
[0124] In this step, server 110 uses animation scale parameters and animation rhythm parameters as adjustment criteria to fine-tune the initial upgrade animation description file, and finally generates a target upgrade animation that is precisely adapted to the spatial attributes of the target area.
[0125] Regarding the adjustment of animation scale parameters, server 110 iterates through all animation components in the initial upgrade animation description file, and calculates the sum of the default attribute parameters of each component and the corresponding scale parameters. Specifically, for size-related attributes, such as the texture tiling scale of the area base animation, the element scaling factor of the landmark highlighting component, and the text size of the logo emerging component, server 110 multiplies the default value by the size multiplier in the scale parameters to obtain the adjusted size value; for particle quantity-related attributes, server 110 multiplies the default emission number of the particle scattering component by the particle quantity multiplier, so that the particle density adapts to the area; for special effect coverage-related attributes, such as the flow radius of the boundary light effect component and the diffusion amplitude of the overlay mask component, server 110 multiplies the default coverage value by the coverage radius multiplier to ensure that the light effects and masking effects can fully cover areas of different sizes. For example, in the initial upgrade animation description file of an industrial area, the default emission rate of the particle dispersing component is 50 particles per second. When the size multiplier is 1.8, the adjusted emission rate is 90 particles per second. At the same time, the default light effect flow radius is 6 virtual units, which is adjusted to 10.8 virtual units, thereby forming a matching visual density and coverage in a large area.
[0126] Regarding the adjustment of animation rhythm parameters, server 110 completely reshapes the timing data in the initial upgrade animation description file. First, server 110 replaces the preset baseline playback duration in the description file with the actual playback duration, using this duration as the new time baseline to proportionally scale the original appearance times and durations of each component. For example, if the components in the initial upgrade animation were originally distributed along a timeline from 0 to 4 seconds, when the actual playback duration determined by the rhythm parameters is 6 seconds, the appearance times and durations of all components are uniformly multiplied by a scaling factor of 1.5, causing the overall animation rhythm to slow down synchronously while maintaining the relative timing relationships between components. Second, server 110 replaces the original easing function configurations of each component according to the easing curve type in the rhythm parameters, ensuring that the motion characteristics of the animation in the start, acceleration, deceleration, and end phases match the area. For example, large areas are more suitable for easing-in / easing-out curves in upgrade animation playback to ensure smooth start and end and a fluid middle; small areas are more suitable for linear or fast easing-out curves to maintain the compact and crisp feel of the animation. Next, server 110 adjusts the time offset between each component. Based on the time offset coefficient determined in the rhythm parameters, it recalculates the staggered distribution of each component on the updated timeline. The larger the area, the greater the interval between the appearances of each component, creating a rich and gradually unfolding effect; the smaller the area, the more synchronized the components become, resulting in a crisp and clean overall presentation. Finally, server 110 adjusts the ratio of particle lifecycle to total playback duration according to the rhythm parameters to ensure that the particle effects can fully present their birth and death process within the adjusted playback duration, avoiding visual discontinuity issues such as particles not dissipating by the end of the animation or dissipating too early.
[0127] After adjustments are complete, server 110 reserializes all updated component attribute parameters to generate a complete target upgrade animation description file. This target upgrade animation description file contains all information for each component, including its adjusted spatial coordinates, size, particle count, coverage area, color value, as well as its adjusted appearance time, duration, and easing curve type. Server 110 sends this file to the rendering engine of client 120, which then renders and plays the final target upgrade animation in real time within the graphical user interface based on the description file.
[0128] In the specific implementation, to ensure that the adjusted animation maintains overall visual harmony, server 110 can also perform a consistency check after the adjustment is completed. This check examines whether there are abnormal overlaps or gaps in the spatial coverage between components, and whether the distribution of components on the timeline shows extreme clustering or sparseness. If any anomalies are detected, automatic correction is performed using smooth interpolation or boundary clipping. After receiving the target upgrade animation data, client 120 can pre-play a simplified animation preview in the upgrade confirmation pop-up window, allowing players to understand the final presentation of the animation before the upgrade officially takes effect, increasing the predictability of the operation. Figure 4 As shown, the upgrade preview pop-up is labeled "Upgrade Preview" at the top. The preview area is delineated by a dotted line within the pop-up, and arrows connect the basic form of the building before the upgrade to the complete advanced form after the upgrade. "Confirm" and "Cancel" operation buttons are set at the bottom of the pop-up, allowing players to visually compare the upgrade effects before choosing whether to perform the formal upgrade.
[0129] This step adjusts the initial upgrade animation in two dimensions through scale and rhythm parameters, so that the final target upgrade animation accurately matches the actual area of the target region in terms of spatial scale and temporal rhythm. This solves the problem of visual crowding in small areas and eliminates the visual sparseness in large areas, realizing the end-to-end differentiated generation of upgrade animation from style tone to spatial adaptation.
[0130] In the above embodiments, after responding to the upgrade animation generation request for the target area, the system first obtains the area attribute information, including the area type and area size, and determines the corresponding target upgrade style template based on the area type. Then, it selects the corresponding animation components to generate the initial upgrade animation, enabling different area types to be displayed using different animation styles and components. This achieves the association and matching between the animation generation process and the area type, thereby reflecting the characteristic differences of different areas. Furthermore, the system determines the animation scale parameters and animation rhythm parameters based on the area size, and adjusts the initial upgrade animation using these parameters to adapt the animation's display scale and playback rhythm to the target area, thus achieving dynamic adjustment of the upgrade animation. By having both area type and area size participate in the upgrade animation generation process, the generated target upgrade animation can be differentiated for different area characteristics, improving the diversity of the animation's visual display.
[0131] In one embodiment, determining the target upgrade style template corresponding to the region type includes:
[0132] Obtain the regional spatial feature information of the target area;
[0133] Based on the region type, obtain the corresponding set of target templates;
[0134] Based on the regional spatial feature information, the corresponding target upgrade style template is matched from the target template set.
[0135] In this embodiment, after responding to the user's click or selection operation on the target area, the server 110 first triggers the process of determining the upgrade style template. The server 110 selects a general upgrade animation basic template from the basic template library as an initial reference. This basic template defines the most basic framework structure of the upgrade animation, including the overall timeline of the animation, the basic color space, and general transition rules. Subsequent template matching and component selection are all refined and replaced based on this.
[0136] After determining the basic template, server 110 acquires the regional spatial feature information of the target area. This information is used to characterize the spatial form and internal layout features of the area in the virtual scene, specifically including but not limited to the area shape coefficient, the area aspect ratio, the distribution density of existing buildings within the area, and the presence of core landmark buildings within the area. The area shape coefficient is obtained by calculating the aspect ratio of the smallest bounding rectangle of the area boundary. For example, an aspect ratio close to 1 indicates that the area is close to a square, while an aspect ratio greater than 2 indicates that the area is elongated. The building distribution density is calculated by the ratio of the building footprint within the area to the total area of the area; this value reflects the current level of development and visual fullness of the area.
[0137] At the same time, server 110 retrieves a set of target templates corresponding to the determined region type from the style template library. This set of target templates contains multiple sub-template versions with different spatial adaptation tendencies under the same region type. Each sub-template differs in the spatial layout rules of animation components, the direction of special effects diffusion, and the alignment of components, in order to adapt to regions with different spatial shapes.
[0138] Based on this, server 110 further refines the positioning according to regional types, identifying the corresponding upgrade styles and template component combinations from the target template set. Specifically, different regional types not only differ in their macro visual style, but their internal material and resource attributes also affect the specific selection of template components. For example, in a simulation management game, buildings in commercial areas may contain glass curtain walls, buildings in industrial areas may involve non-glass metal or concrete materials, and warehouse areas involve specific elements such as cargo stacking and transportation facilities. These differences determine that sub-regions with different functional positioning under the same regional type still need to be further differentiated at the template component level. Server 110 can subdivide regions into subcategories such as glass-dominated, non-glass-dominated, or cargo-operation-dominated based on the main building material type or core functional attributes within the region, and match the corresponding component combination schemes in the target template set. For example, glass-dominated regions enhance flowing light reflection and transparent light effect components in upgrade animations, while cargo-operation-dominated regions enhance conveyor belt dynamics and cargo stacking and rising components.
[0139] Furthermore, based on the acquired regional spatial feature information and the aforementioned detailed positioning results, server 110 matches the most suitable target upgrade style template from the target template set. The specific matching logic can employ a feature vector distance calculation method: feature information such as regional shape coefficients, aspect ratios, building density, and material properties are encoded into feature vectors. Simultaneously, the applicable feature range corresponding to each sub-template in the template set is also encoded into a corresponding feature vector. The closest template is determined by calculating Euclidean distance or cosine similarity. After matching is complete, server 110 can use the target upgrade style template to perform subsequent animation component selection and combination generation operations.
[0140] This embodiment introduces regional spatial feature information as a second matching dimension on the basis of regional type matching, so that the selection of upgrade style template can be further adapted to the specific spatial form and internal layout of the region. This avoids the problem of poor visual adaptability caused by using the same template for regions with different spatial structures under the same type, and improves the precision of template matching and the scene fit of upgrade animation.
[0141] In one embodiment, matching a corresponding target upgrade style template from a set of target templates based on regional spatial feature information includes:
[0142] Extract spatial feature parameters from regional spatial feature information;
[0143] Calculate the matching degree between each upgraded style template in the target template set and the spatial feature parameters;
[0144] The upgrade style template that meets the preset matching conditions will be used as the corresponding target upgrade style template.
[0145] In this embodiment, after obtaining the regional spatial feature information of the target area, the server 110 extracts quantified spatial feature parameters from it as a quantitative basis for template matching. The spatial feature parameters specifically include the region's aspect ratio, area tier, building density percentage, and boundary complexity coefficient. The region's aspect ratio is calculated as the ratio of the longer side to the shorter side of the region's smallest bounding rectangle; the building density is obtained by dividing the total building area within the region by the total area of the region; and the boundary complexity coefficient is characterized by the ratio of the number of protrusions and convexities on the region's boundary outline to the total length of the boundary. This coefficient reflects the regularity of the region's shape; regular rectangular regions have lower boundary complexity, while regions with irregular protrusions or depressions have higher boundary complexity. After normalizing these parameter values, the server 110 forms a set of multi-dimensional spatial feature parameter vectors. For example, the normalized feature vector of a certain region can be represented as [aspect ratio 0.6, area tier 0.8, building density 0.3, boundary complexity 0.2].
[0146] After extracting the spatial feature parameters, server 110 iterates through each upgraded style template in the target template set, calculating the matching degree between each template and the spatial feature parameters. Each upgraded style template is pre-associated with a set of applicable spatial feature ranges in the template library. These ranges are stored in the form of feature intervals. For example, the applicable conditions for a certain "Naturally Grown Template - Square and Compact Version" are an aspect ratio of 0.5 to 1.2, an area range of 0.3 to 0.7, and a building density of 0.2 to 0.6. When the spatial feature parameters of the target area fall within this interval, the matching degree is high. Server 110 can use weighted Euclidean distance to calculate the distance between each template and the target spatial feature parameters. The smaller the distance, the higher the matching degree. During the calculation process, the weights of different spatial feature parameters can be configured differently according to their influence on visual performance. For example, the aspect ratio directly affects the arrangement direction of animation components, so its weight can be set higher; the boundary complexity has a relatively small impact on template selection, so its weight can be reduced accordingly. In addition, the applicable feature range of the template is usually set with a tolerance range. When the target parameter value is near the tolerance boundary, the matching degree calculation result will show a smooth transition, rather than a hard judgment of either / or.
[0147] After calculating the matching degree of each template, server 110 determines the upgrade style template whose matching degree meets the preset conditions as the target upgrade style template. The preset conditions can be specifying the template with the highest matching degree as the target template, or setting a matching degree threshold and selecting the template with the highest score among all templates with matching degrees higher than the threshold as the target. In some implementations, if the difference between the highest matching degree and the second highest matching degree is less than the preset competition threshold, server 110 can also combine other auxiliary information for secondary adjudication, such as prioritizing templates with a richer number of components or lower performance overhead, to ensure that the selected template achieves a balance between matching degree and usability. After determining the target upgrade style template, server 110 performs subsequent animation component selection and initial upgrade animation generation operations according to the definition of the template.
[0148] This embodiment quantifies regional spatial feature information into feature parameters and performs template matching based on feature distance calculation, thereby realizing the quantification and automation of style template selection. This avoids the subjectivity and uncertainty of human experience judgment and improves the objectivity and reproducibility of template matching.
[0149] In one embodiment, an initial upgrade animation is generated by selecting the corresponding animation component based on the target upgrade style template, including:
[0150] Based on the component layout rules in the target upgrade style template, select the corresponding animation component from the preset component library;
[0151] Based on the component layout rules, analyze the spatial and hierarchical relationships between the animation components;
[0152] Based on the animation splicing rules in the upgraded style template, determine the dependencies and timing order between each animation component;
[0153] Based on spatial relationships, hierarchical relationships, dependencies, and temporal arrangements, the animation components are combined to generate the initial upgrade animation.
[0154] In this embodiment, after determining the target upgrade style template, the server 110 selects the corresponding animation components from the preset component library according to the predefined component layout rules in the template. The component layout rules specify which functional categories of animation components need to be activated under the template. For example, the "natural growth template" for residential areas requires the selection of area base animation components, boundary light effect components, particle dispersal components, and signage emergence components, while the "energy pulse template" for industrial areas requires the selection of area base animation components, boundary light effect components, landmark highlighting components, and overlay masking components. The component combination methods corresponding to different templates are different to ensure that the functional components of the upgrade animation for each type of area match its visual tone.
[0155] Server 110 further analyzes the spatial and hierarchical relationships between various animation components based on component layout rules. Spatial relationships determine the relative coordinates and arrangement of each component in the virtual scene. For example, boundary lighting components should be placed along the area boundary line, landmark highlighting components should be located at the geometric center of the area or the location of the core building, and the emission origin of particle scattering components can be evenly distributed on the internal grid nodes of the area. Hierarchical relationships determine the rendering stacking order of each component. For example, overlay masking components are usually located on the top layer to cover the entire area and achieve overall tone transition; the logo emergence component is next, located above the center of the area; boundary lighting components are located on the surface of the area's edge; and the area base animation components are located at the bottom layer. Correct hierarchical relationships ensure that components do not cause incorrect visual occlusion when played simultaneously.
[0156] Meanwhile, server 110 determines the dependencies and timing order of each animation component based on the animation splicing rules in the upgraded style template. Dependencies define that the playback of certain components must wait for other components to complete before it can begin or proceed synchronously. For example, the scaling animation of the landmark highlighting component might depend on the boundary light effect component completing a full circle before triggering, and the logo emergence component might depend on the overlay mask component reaching a certain transparency threshold before appearing. The timing order specifies the sequential and staggered distribution of components on the timeline. For instance, the overlay mask component starts first and gradually deepens its tone, followed by the boundary light effect component flowing from the edge of the area, the landmark highlighting component entering the magnification and emphasis phase halfway through the light effect flow, the particle scattering component producing scattering effects throughout, and the logo emergence component showing a change in display level towards the end of the animation.
[0157] After completing the above analysis, server 110 integrates the spatial location relationships, hierarchical relationships, dependency relationships, and temporal arrangement relationships, and combines and arranges the various animation components to generate a complete initial upgrade animation description file. In this file, each component is assigned clear spatial coordinates, rendering level, trigger conditions, start time, duration, and other information. The logical relationships between the components are clear and the timing is orderly, ensuring the coordination and coherence of subsequent animation playback.
[0158] This embodiment achieves automated selection and arrangement of animation components through dual-driven component layout rules and animation splicing rules. This provides a clear and structured rule basis for the generation process of the initial upgrade animation, avoiding the subjectivity and arbitrariness of manual assembly, and ensuring the consistency and maintainability of the initial upgrade animation generation in different scenarios.
[0159] In one embodiment, the animation components are combined according to spatial location relationships, hierarchical relationships, dependency relationships, and temporal arrangement relationships to generate an initial upgrade animation, including:
[0160] Map the spatial relationships to the spatial coordinates of each animation component within the target area;
[0161] Convert the hierarchical relationship into the rendering hierarchy of each animation component;
[0162] Based on the dependencies, construct a directed acyclic graph (DAG) between the animation components, and generate the execution time window for each animation component according to the DAG and the time arrangement order.
[0163] Based on spatial coordinates, rendering level, and execution time window, the animation components are combined to generate the initial upgrade animation.
[0164] In this embodiment, after the server 110 completes the parsing of the spatial positional relationship, hierarchical relationship, dependency relationship and time arrangement relationship between each animation component, it transforms these logical relationship descriptions into executable structured data to generate a complete initial upgrade animation description file.
[0165] Server 110 maps spatial relationships to the specific spatial coordinates of each animation component within the target area. Spatial relationships describe the relative positioning logic between components; for example, boundary lighting components are arranged along the edge of the area, while landmark highlighting components are located at the center. Server 110 combines the actual spatial extent data of the target area to convert these relative positions into absolute coordinate values in a specific virtual spatial coordinate system. For example, the pathpoint coordinates of the boundary lighting components are calculated based on the actual boundary vertex coordinates of the area, while the emission origin of the particle scattering components is determined based on the coordinates of the grid nodes within the area. After mapping, each animation component obtains its precise position coordinates within the target area.
[0166] Server 110 translates the hierarchy into rendering levels for each animation component. The hierarchy describes the occlusion logic between components, and server 110 assigns a specific rendering level value to each component based on this logic; a higher level value indicates a higher position during rendering. For example, an overlay / mask component is assigned the highest level value to ensure it covers other components, while a region / base animation component is assigned the lowest level value to ensure it is at the bottom layer. During playback, client 120's rendering engine determines the stacking order of components on the screen based on these level values, thereby avoiding incorrect visual occlusion.
[0167] Server 110 constructs a directed acyclic graph (DAG) between animation components based on their dependencies, and generates execution time windows for each animation component according to this DAG and the timing sequence. Dependencies clearly define the pre-constraints on the playback sequence between components; for example, component B can only begin after component A is completed. Server 110 models these constraints as edges in the DAG, with each component acting as a node, the direction pointing from the dependent to the dependent. After the DAG is constructed, server 110, combined with the timing sequence defined in the template, extracts the topological sort of each node from the graph and assigns a specific execution time window to each component, including the start time and duration. The design of the DAG ensures that the dependencies between components do not lead to deadlock situations involving circular waiting, making the allocation of time windows definite and deterministic.
[0168] Server 110 combines the various animation components based on the mapped spatial coordinates, rendering level, and execution time window, encapsulating the attribute information of all components into a structured initial upgrade animation description file. This description file is organized in a standardized data format, with each component corresponding to an independent configuration node, containing coordinate fields, level fields, time window fields, component type identifiers, and default attribute parameters. Client 120's rendering engine can directly parse this file and execute animation rendering.
[0169] This embodiment achieves automated conversion from logical relationships to executable data formats by structurally mapping spatial coordinates, rendering levels, dependencies, and time windows. This ensures the logical correctness of the initial upgrade animation in terms of spatial arrangement and time sequence, and provides a clear and easily modifiable data foundation for subsequent fine-tuning of the animation.
[0170] In one embodiment, determining the animation scale parameters and animation rhythm parameters based on the area of the region includes:
[0171] Determine the area level corresponding to the region's area;
[0172] Obtain the baseline scale parameters corresponding to the area level, and adjust the baseline scale parameters according to the deviation between the area of the region and the area range corresponding to the area level to obtain the animation scale parameters;
[0173] Obtain the rhythm configuration template corresponding to the area level, and generate animation rhythm parameters based on the rhythm configuration template.
[0174] In this embodiment, after obtaining the area of the target region, the server 110 first determines the area level to which the area belongs. The server 110 has multiple preset area levels, each corresponding to a continuous numerical range. For example, the small level corresponds to an area of less than or equal to 20 grid cells, the medium level corresponds to an area of more than 20 and less than or equal to 60 grid cells, the large level corresponds to an area of more than 60 and less than or equal to 120 grid cells, and the extra-large level corresponds to an area of more than 120 grid cells. The server 110 determines the area level of the target region according to the actual area value and the range it belongs to.
[0175] After determining the area level, server 110 obtains the baseline scale parameters corresponding to that area level. Each area level is associated with a set of baseline scale parameters in its configuration. These parameters define the default scale configuration of the animation components at that level, including the baseline size multiple, the baseline particle number multiple, and the baseline coverage radius multiple. Based on this, server 110 further adjusts the baseline scale parameters according to the deviation between the area of the region and the area range corresponding to its area level, obtaining the final animation scale parameters. Specifically, if the target area is in the lower range of the level range, the scale parameters are slightly adjusted downwards; if it is in the higher range, the scale parameters are slightly adjusted upwards; if it is exactly in the middle of the range, the baseline scale parameters are used directly without adjustment. This deviation adjustment ensures that when the area falls in different positions within the same level range, the animation scale presentation still presents a continuous and smooth transition, avoiding visual jumps caused by hard division of level boundaries.
[0176] In determining the animation rhythm parameters, server 110 obtains the rhythm configuration template corresponding to the area level and generates the animation rhythm parameters based on the template. Different area level rhythm configuration templates preset different baseline values in dimensions such as playback duration, easing curve type, and component time offset. For example, the template corresponding to the small area level has a shorter playback duration, a faster easing curve, and a smaller component time offset, resulting in a compact and crisp overall visual effect for the upgrade animation of small areas; the template corresponding to the large area level has a longer playback duration, a smoother easing curve, and a larger component time offset, resulting in a layered and orderly visual effect for the upgrade animation of large areas. Specifically, in the upgrade animation of industrial areas, when the area level is large, the rhythm configuration template extends the time window of each stage, causing the workshop roof to unfold piece by piece like origami, new mechanical equipment to slowly rise hydraulically from the ground, and conveyor belts to grow from nothing along a preset path, with ample observation intervals between each action; while when the area level is small, the above actions are completed synchronously or nearly synchronously at a faster speed, maintaining the compactness of the animation. Server 110 generates complete animation rhythm parameters according to the preset values in the rhythm configuration template.
[0177] This embodiment achieves an organic combination of hierarchical coarse-scale configuration and continuous fine-tuning of scale parameters through the interval mapping and deviation fine-tuning mechanism of area level, taking into account both the simplicity of configuration management and the precision of actual performance; at the same time, through hierarchical rhythm configuration templates, the animation playback rhythm of different area regions can be adapted to their spatial scale, effectively improving the adaptability of the upgrade animation in both scale and rhythm dimensions.
[0178] In one embodiment, the baseline scale parameter is adjusted based on the deviation between the region area and the area range corresponding to the area level to obtain the animation scale parameter, including:
[0179] Obtain the area range corresponding to the area level;
[0180] Calculate the area difference between the region area and the lower limit of the area range, and calculate the area correction ratio based on the area difference;
[0181] Based on the area correction ratio, the spatial expansion range in the baseline scale parameters is adjusted to obtain the animation scale parameters.
[0182] In this embodiment, after determining the area level of the target area, the server 110 further obtains the area range corresponding to that area level. Each area level is associated with a continuous range; for example, a medium-sized area corresponds to an area greater than 20 and less than or equal to 60 grid cells, with a lower limit of 20 and an upper limit of 60. The server 110 reads the upper and lower limits of the area range for that level from the configuration storage module as input for subsequent deviation calculations.
[0183] After obtaining the area range, server 110 calculates the area difference between the target area and the lower limit of the area range, and then calculates the area correction ratio based on this difference. The area difference is the actual area of the region minus the lower limit of the range, reflecting the relative position of the region's area within its respective grade range. The area correction ratio is the area difference divided by the range span, which is equal to the upper limit of the range minus the lower limit. Through this calculation, the correction ratio is normalized to a value between 0 and 1. For example, if the actual area of a target region is 45 grid cells, and the area range of the medium grade is 20 to 60, then the area difference is 25, the range span is 40, and the area correction ratio is 0.625. The closer the correction ratio is to 0, the closer the region's area is to the lower limit of that grade; the closer it is to 1, the closer the region's area is to the upper limit of that grade.
[0184] Based on this, server 110 adjusts the spatial expansion range in the baseline scale parameters according to the area correction ratio to obtain the animation scale parameters. The spatial expansion range includes, but is not limited to, the size multiple of each animation component, the emission coverage radius of particle effects, the flow path length of boundary light effects, and the texture spread of the regional base animation. Specifically, server 110 obtains the preset minimum and maximum values for each parameter related to the spatial expansion range at that area level, and then performs linear interpolation calculations between the minimum and maximum values according to the area correction ratio. Taking the size multiple as an example, the baseline size multiple for the medium-sized level has a minimum value of 0.8 and a maximum value of 1.3. When the correction ratio is 0.625, the adjusted size multiple is 0.8 plus 0.625 multiplied by the difference between 1.3 and 0.8, resulting in a final value of 1.1125. Parameters such as particle coverage radius and light effect path length are calculated using the same interpolation logic. In this way, the animation scale parameters of regions located at different positions within the same area level range can present a smooth transition effect as the area changes continuously, avoiding abrupt changes in scale parameters caused by rigid division of level boundaries.
[0185] This embodiment calculates the relative position of the area within its respective area level range and adjusts it linearly by a correction ratio. This achieves a continuous and smooth transition of the animation scale parameter within the level range, avoiding the scale jump caused by hard division at the level boundary and improving the precision and smoothness of scale parameter determination.
[0186] In one embodiment, generating animation rhythm parameters based on a rhythm configuration template includes:
[0187] Obtain the time mapping curve corresponding to the rhythm configuration template;
[0188] Based on the time mapping curve, determine the actual playback time axis positions corresponding to multiple key positions on the standardized time axis, and obtain multiple speed curve control points;
[0189] Based on multiple speed curve control points, determine the playback speed coefficient corresponding to each animation stage;
[0190] Animation rhythm parameters are generated based on the speed curve control points and various playback speed coefficients.
[0191] In this embodiment, after obtaining the rhythm configuration template corresponding to the area level, the server 110 further reads the associated time mapping curve from the template. The time mapping curve describes the overall time rhythm distribution of the upgrade animation from start to finish. Its horizontal axis is the standardized time axis, with a value range of 0 to 1, used to represent the percentage of animation playback progress; the vertical axis is the actual playback time axis, used to represent the actual playback moment after mapping. The shape of the time mapping curve determines the playback speed of the animation in different progress intervals: a larger curve slope indicates a faster playback speed in that interval, corresponding to a compact and progressive rhythm; a smaller curve slope indicates a slower playback speed in that interval, corresponding to a smooth and extended rhythm.
[0192] After acquiring the time mapping curve, server 110 determines the actual playback timeline positions corresponding to multiple key locations on the standardized timeline based on the curve, thereby obtaining multiple speed curve control points. These key locations are typically selected from nodes on the standardized timeline that have rhythmic significance, such as the start position, the transition position between animation stages, and the end position. For example, server 110 uses positions such as 0, 0.2, 0.5, 0.75, and 1.0 on the standardized timeline as key nodes, and substitutes them into the time mapping curve to calculate their corresponding actual playback times. Assuming an industrial area is at a large level, and the time mapping curve is a slow-in / slow-out type, the actual playback time corresponding to standardized position 0 is 0 seconds, 0.2 corresponds to 0.6 seconds, 0.5 corresponds to 2.0 seconds, 0.75 corresponds to 3.8 seconds, and 1.0 corresponds to 6.0 seconds. These one-to-one corresponding coordinate points constitute the speed curve control points, which together describe the outline of the overall time rhythm of the animation.
[0193] Based on this, server 110 determines the playback speed coefficient corresponding to each animation stage according to multiple speed curve control points. Server 110 divides the upgrade animation into different stages according to function, such as the opening development stage, the main evolution stage, and the ending freeze-frame stage, with each stage corresponding to a different standardized time axis interval. Server 110 calculates the average playback speed coefficient within each stage based on the control points corresponding to the start and end positions of each stage. Specifically, the playback speed coefficient can be obtained by dividing the actual playback time span of the stage by the standardized time span; the larger the coefficient value, the faster the playback speed of the stage. For example, the standardized range for the opening development phase is 0 to 0.2, corresponding to an actual playback time of 0 to 0.6 seconds. Therefore, the playback speed coefficient is 0.6 divided by 0.2, which equals 3.0, indicating that this phase progresses at a relatively fast pace to quickly complete the opening effect. The standardized range for the main evolution phase is 0.2 to 0.75, corresponding to an actual playback time of 0.6 to 3.8 seconds. The playback speed coefficient is 3.2 divided by 0.55, approximately equal to 5.8, indicating that this phase unfolds layer by layer at a relaxed pace, allowing players to fully observe the evolution of the facilities. The standardized range for the closing freeze phase is 0.75 to 1.0, corresponding to an actual playback time of 3.8 to 6.0 seconds. The playback speed coefficient is 2.2 divided by 0.25, equal to 8.8, indicating that the speed of this phase further slows down, emphasizing a sense of completion and the effect of the freeze-frame ceremony.
[0194] Finally, server 110 encapsulates the speed curve control points and the playback speed coefficients corresponding to each animation stage into a structured animation rhythm parameter. This parameter contains a complete sequence of time-mapped control points and the rate identifier for each stage, used to calculate the specific appearance time and duration of each animation component on the adjusted timeline.
[0195] This embodiment realizes the structured description and quantitative generation of animation rhythm through time mapping curves and control point mechanisms, transforming abstract rhythm perception into calculable control point data, improving the flexibility and adjustability of rhythm parameter configuration, and enabling upgrade animations at different area levels to obtain time performances with differentiated rhythmic characteristics.
[0196] In one embodiment, the initial upgrade animation is adjusted based on animation scale parameters and animation rhythm parameters to generate the target upgrade animation, including:
[0197] Based on the animation scale parameters, the spatial coordinates of each animation component in the initial upgrade animation are adjusted to obtain the target spatial position of each animation component;
[0198] Based on the animation rhythm parameters, adjust the execution time window corresponding to each animation component in the initial upgrade animation to obtain the target playback sequence for each animation component;
[0199] Generate target upgrade animation based on target spatial location and target playback sequence.
[0200] In this embodiment, after obtaining the animation scale parameters and animation rhythm parameters, the server 110 makes targeted adjustments to the initial upgrade animation description file from the spatial dimension and the temporal dimension, respectively, and finally combines them to generate the target upgrade animation.
[0201] In terms of spatial dimension adjustment, server 110 adjusts the spatial coordinates and related attributes of each animation component in the initial upgrade animation one by one according to sub-parameters such as size multiple, particle number multiple, and coverage radius multiple in the animation scale parameters, to obtain the target spatial position of each animation component. Specifically, for the regional base animation component, server 110 multiplies its texture tiling coordinates and coverage area coordinates by the size multiple, so that the dynamic effect of the base can be fully extended in a large area and moderately contracted in a small area; for the boundary light effect component, server 110 scales its path point coordinates according to the center of the region, and multiplies the distance between the path point and the center of the region by the size multiple, so that the light effect flow path can adaptively expand or shrink with the area area, always maintaining a surrounding effect near the edge of the region; for the particle scattering component, server 110 scales its emission origin coordinates as a whole according to the size multiple, while multiplying the emission number by the particle number multiple and the effect coverage radius by the coverage radius multiple, so as to synchronously adapt the spatial coverage breadth and particle density to the area area. For landmark highlighting components and logo emerging components, server 110 also scales their positioning coordinates and element size proportionally according to the size multiple to ensure that they maintain the appropriate proportion and position in the adjusted spatial layout.
[0202] Regarding time-dimensional adjustments, server 110 adjusts the execution time windows corresponding to each animation component in the initial upgrade animation based on the speed curve control points and playback speed coefficients of each stage in the animation rhythm parameters, thus obtaining the target playback sequence for each animation component. Server 110 first replaces the baseline playback duration in the initial description file with the actual playback duration in the rhythm parameters. Then, for each animation component, server 110 determines the playback speed coefficient corresponding to its animation stage, maps the component's standardized time position to its specific position on the actual timeline according to the speed coefficient, and recalculates its start and end times. Server 110 also replaces the easing function configuration of each component based on the easing curve type in the rhythm parameters and readjusts the staggered distribution between components based on the time offset coefficient. After completing these adjustments, each component obtains an updated execution time window.
[0203] After adjusting the spatial coordinates and playback timing, server 110 writes the updated target spatial location and target playback timing into the initial upgrade animation description file, replacing the original coordinate fields and time window fields of each component, while preserving the hierarchical relationships and dependencies between components, ultimately generating a complete target upgrade animation description file. This file is sent to the rendering engine of client 120, which parses and executes the playback.
[0204] This embodiment independently adjusts and comprehensively reorganizes the initial upgrade animation from two dimensions: spatial coordinates and playback timing, by using scale parameters and rhythm parameters respectively. This achieves dual adaptation of the upgrade animation in terms of spatial scope and temporal rhythm, ensuring that the spatial layout logic and temporal dependency relationship between the components are not disrupted during the adjustment process, thereby improving the accuracy and reliability of the target upgrade animation generation.
[0205] In one embodiment, the spatial coordinates of each animation component in the initial upgrade animation are adjusted according to the animation scale parameter to obtain the target spatial position of each animation component, including:
[0206] Get the spatial expansion range from the animation scale parameter;
[0207] Based on the spatial coordinates of each animation component in the initial upgrade animation, determine the direction vector of each animation component relative to the center of the target area;
[0208] Based on the spatial expansion range, the vectors of each direction are scaled to obtain the target offset of each animation component;
[0209] Calculate the target spatial position of each animation component based on the target offset.
[0210] In this embodiment, when adjusting the spatial coordinates of each animation component in the initial upgrade animation, the server 110 adopts a direction vector scaling strategy based on the region center. The server 110 first obtains the spatial expansion range from the animation scale parameters. The spatial expansion range is a comprehensive scale control parameter used to uniformly characterize the overall expansiveness of each visual element in the upgrade animation in the spatial dimension; its value is positively correlated with the area of the region. This parameter can be expressed as a multiplier; for example, a larger area corresponds to a spatial expansion range of 1.8 times, and a smaller area corresponds to a spatial expansion range of 0.6 times. The spatial expansion range serves as the core scaling benchmark, uniformly affecting the spatial position adjustment of all animation components, ensuring that the components maintain a consistent relative positional relationship after scaling.
[0211] After obtaining the spatial expansion range, server 110 iterates through each animation component in the initial upgrade animation description file, determining its direction vector relative to the center of the target area based on the spatial coordinates of each component. Specifically, server 110 uses the geometric center of the target area as the origin of the coordinate system. For each animation component, it subtracts the area center coordinates from its spatial coordinates to obtain the component's position vector relative to the area center. This direction vector contains both the component's directional angle and original distance information relative to the area center. For example, if the spatial coordinates of a boundary light effect component are (10,8) and the area center coordinates are (4,4), then the direction vector is (6,4), indicating that the component is located to the upper right of the area center.
[0212] Server 110 further scales each directional vector according to the spatial expansion range to obtain the target offset corresponding to each animation component. The specific calculation method is as follows: multiply each component of the directional vector of each component by the spatial expansion range multiplier to obtain the scaled offset vector. For example, if the directional vector of a component is (6,4) and the spatial expansion range is 1.8 times, then the target offset is (10.8,7.2). When the spatial expansion range is greater than 1, the distance between the components and the center of the area increases, and the animation coverage expands; when the spatial expansion range is less than 1, the components move closer to the center of the area, and the animation coverage shrinks. Through this method, the spatial distribution density of each component adaptively adjusts with the area, and all components are scaled relative to the same center point, ensuring the symmetry and coordination of the overall layout structure.
[0213] Based on this, server 110 calculates the target spatial position of each animation component according to the target offset. Specifically, the target offset of each component is added to the coordinates of the region center to obtain the adjusted target spatial coordinates of that component. For example, if the region center coordinates are (4,4) and the target offset is (10.8,7.2), then the target spatial position is (14.8,11.2). For components located at or near the region center, their direction vector magnitude is small or zero, resulting in a smaller or unchanged positional change after scaling. This aligns with the visual expectation that components in the central region should maintain relative stability during scaling adjustments. After all components have been calculated, server 110 replaces the original spatial coordinates of each component with the calculated target spatial position.
[0214] This embodiment achieves the linkage adjustment of the spatial position of each animation component and the area of the region through a direction vector scaling mechanism based on the region center. While keeping the original directional relationship of each component relative to the region center unchanged, it adapts to the spatial coverage requirements of the region as a whole, avoiding changes in the relative angle relationship between components and visual misalignment.
[0215] In one embodiment, the execution time window corresponding to each animation component in the initial upgrade animation is adjusted according to the animation rhythm parameters to obtain the target playback sequence corresponding to each animation component, including:
[0216] Based on the speed curve control points in the animation rhythm parameters and the playback speed coefficients corresponding to each animation stage, a time mapping relationship between the standardized time axis and the actual playback time axis is constructed.
[0217] Based on the time mapping relationship, the execution time window corresponding to each animation component is mapped to the actual playback timeline to obtain the target execution time window corresponding to each animation component;
[0218] Generate the target playback sequence based on the execution time window of each target.
[0219] In this embodiment, after obtaining the animation rhythm parameters, the server 110 constructs a time mapping relationship between the standardized time axis and the actual playback time axis based on the speed curve control points and the playback speed coefficients corresponding to each animation stage. The standardized time axis has a value range of 0 to 1, used to characterize the relative position of the execution time window of each component in the initial upgrade animation after normalization; the actual playback time axis is in seconds, used to characterize the specific time position of each component in the actual playback process after adjustment. The server 110 uses the speed curve control points as interpolation nodes and the playback speed coefficients of each stage as slope constraints between nodes to construct a complete piecewise mapping curve. This curve defines the one-to-one conversion relationship between any position on the standardized time axis and the actual playback time axis.
[0220] Based on this, server 110 maps the execution time windows corresponding to each animation component in the initial upgrade animation to the actual playback timeline according to the time mapping relationship, thus obtaining the target execution time window for each animation component. The execution time window of each component in the initial upgrade animation is defined by two endpoints: start time and end time, with values ranging from 0 to 1 within the standardized timeline range. Server 110 substitutes the start and end times of each component into the time mapping relationship for calculation, obtaining its corresponding start and end times on the actual playback timeline, thereby determining the adjusted target execution time window.
[0221] In its implementation, server 110 performs independent mapping calculations for each animation component. Taking an upgrade animation of an industrial area as an example, the standardized execution time window for the roof unfolding component in the initial upgrade animation description file is 0.1 to 0.4 seconds, for the equipment raising component it's 0.25 to 0.55 seconds, and for the conveyor belt growth component it's 0.4 to 0.7 seconds. Server 110 substitutes the start and end times of each component into the time mapping relationship for calculation, obtaining the target execution time window for each component on the actual playback timeline. Because the time mapping curve allocates more actual time to the equipment raising and conveyor belt growth stages, the roof unfolding stage is relatively compressed, ultimately presenting a rhythmic effect of rapid roof unfolding followed by the gradual evolution of the equipment and conveyor belt. The corresponding target execution time windows are 0.4 to 1.8 seconds, 1.0 to 3.2 seconds, and 1.8 to 4.5 seconds, respectively. This mapping method ensures that while maintaining the original relative order and overlap of the execution time windows of each component, the overall rhythmic outline and the design intent of the rhythm configuration template are also consistent. Figure 1 To.
[0222] Once the target execution time window for each animation component is determined, server 110 summarizes and organizes all target execution time windows according to the component identifier, generating complete animation target playback timing data. This data includes the start and end times of each component after the update, and is written to the upgrade animation description file to replace the original execution time window field.
[0223] This embodiment establishes a time mapping relationship by using speed curve control points and playback speed coefficients, realizing a non-linear mapping transformation from the standardized time axis to the actual playback time axis. This allows the playback sequence of each animation component to obtain a speed change curve that conforms to the design intent of the rhythm configuration template while maintaining the original relative order and overlapping relationship, thus improving the flexibility and accuracy of rhythm adjustment.
[0224] In one embodiment, the method further includes:
[0225] Obtain environmental status information corresponding to the target area;
[0226] Based on the environmental status information, determine the corresponding environmental adjustment parameters and environmental adaptation elements;
[0227] Adjust the animation elements in the target upgrade animation according to the environmental adjustment parameters, and update the target upgrade animation according to the environmental adaptation elements.
[0228] In this embodiment, after generating the target upgrade animation or during the generation process, the server 110 further obtains the current environmental state information corresponding to the target area. This environmental state information is used to characterize the real-time state of the environment in which the target area is located in the game's virtual scene. The environmental state information specifically includes, but is not limited to, the current weather type, such as sunny, rainy, snowy, windy, or dusty weather; the current time period type, such as daytime, dusk, or nighttime; and extreme environment markers, such as whether it is under a typhoon, blizzard, or other severe weather warning. The server 110 can read this information from the game's global environment management module, which continuously maintains and updates the environmental state data of the entire game scene.
[0229] After acquiring environmental status information, server 110 determines the corresponding environmental adjustment parameters and environmental adaptation elements based on this information. Environmental adjustment parameters control the dynamic adjustment of visual attributes such as color, brightness, and transparency of existing animated elements in the target upgrade animation. For example, in rainy weather, the overall brightness is reduced and the cool tone offset is increased; in nighttime weather, the ambient light intensity is reduced and the self-illumination effect is enhanced; in snowy weather, the overall saturation is increased and the color temperature is adjusted to be cooler. Environmental adaptation elements are new visual elements superimposed on the target upgrade animation to enhance the integration and realism of the upgrade animation with the current environmental status. For example, when the environmental status is rainy, the environmental adaptation elements determined by server 110 include rainproof covering elements, such as adding a membrane rainproof structure to the open-air production facilities in the target area, creating a dynamic effect of stretched coverage on the top of the facilities; adding raincoat elements attached to the characters or equipment models working in the area; and adding water splash elements to the particle system of the upgrade animation to create additional water splash effects. Figure 5 As shown, a tensioned rainproof canopy structure supported by pillars is erected above the target work area in rainy weather. All work personnel within the area are dressed in corresponding raincoats. The scene simultaneously displays the special effects of raindrops falling and water splashing on the ground, making the visual presentation of the upgrade animation highly integrated with the current weather environment. When the environment is a typhoon, the environmental adaptation elements determined by server 110 include work stoppage indicators, such as warning signs indicating that construction is suspended appearing at the edge of the area. At the same time, the main evolution phase of the upgrade animation is extended or windproof reinforcement transition actions are inserted to simulate the protective operations during typhoon work stoppages in actual construction scenarios. When the environment is at night, the environmental adaptation elements determined by server 110 include lighting elements, such as adding warm-colored light strips to the area boundaries and adding indicator lights to key parts of equipment.
[0230] After determining the environmental adjustment parameters and environmental adaptation elements, server 110 adjusts the existing animation elements in the target upgrade animation according to the environmental adjustment parameters. Specifically, this includes traversing each component in the target upgrade animation description file and overlaying and correcting its adjustable attributes such as color values, brightness values, and transparency curves according to the environmental adjustment parameters. Simultaneously, server 110 selects corresponding adaptation components from the preset component library based on the environmental adaptation elements, inserts them into the corresponding level and time position in the target upgrade animation description file according to the predetermined position and timing rules of the environmental adaptation elements, and merges and splices them with the original components to finally generate the updated target upgrade animation description file. For example, in a rainy scene, the rainproof covering component is inserted above the base animation component, with its execution time window synchronized with the main evolution stage; the water splash component is inserted as a child of the particle scattering component, with its emission origin distributed along the edge of the area and continuously emitted throughout the entire animation process.
[0231] This embodiment dynamically adjusts and supplements elements of the target upgrade animation by introducing environmental state information, so that the upgrade animation can adapt to the scene atmosphere under different weather and time conditions, effectively improving the realism of the virtual world under different environmental states and avoiding the problem of the upgrade animation performing consistently in various environmental states and becoming disconnected from the scene atmosphere.
[0232] In one embodiment, determining the corresponding environmental adjustment parameters and environmental adaptation elements based on environmental state information includes:
[0233] Based on the environmental status information, match the corresponding environmental adjustment strategy from the preset environmental strategy library;
[0234] Based on the environmental adjustment strategy, determine the parameter adjustment rules and environmental adaptation rules;
[0235] Based on the parameter adjustment rules, determine the environment adjustment parameters corresponding to the animation elements in the target upgrade animation;
[0236] Based on the environment adaptation rules, determine the environment adaptation elements corresponding to the target upgrade animation.
[0237] In this embodiment, after obtaining the environmental status information of the target area, the server 110 matches the corresponding environmental adjustment strategy from a preset environmental strategy library. The preset environmental strategy library is pre-stored in the configuration storage module of the server 110, and it maintains the mapping relationship between environmental states and adjustment strategies. Each environmental state corresponds to an independent environmental adjustment strategy, which defines how the upgrade animation should be adjusted and supplemented under that environmental condition. For example, the adjustment strategy matched for rainy weather is "rain protection strategy," the adjustment strategy matched for typhoon weather is "work stoppage and risk avoidance strategy," the adjustment strategy matched for nighttime weather is "nighttime lighting strategy," and the adjustment strategy matched for snowy weather is "low temperature protection strategy." The strategy library is designed based on the actual impact of different environmental states on the construction scene, facility operation, and visual presentation, ensuring that the adjustment direction is reasonable for the scene.
[0238] After matching the corresponding environment adjustment strategy, server 110 further parses the parameter adjustment rules and environment adaptation rules from the strategy. The parameter adjustment rules describe how the existing animation elements in the target upgrade animation should change in terms of visual attributes such as color, brightness, and transparency according to the environmental state. For example, in the rainy weather strategy, the parameter adjustment rules stipulate that the overall brightness of all animation components should be reduced by 15% to 20%, the color temperature should shift towards cooler tones, and the transparency of particle effects should be increased to simulate rain and fog effects. The environment adaptation rules describe which new visual elements need to be added to the upgrade animation and how they should be integrated. For example, in the rainy weather strategy, the environment adaptation rules stipulate that a rainproof covering component should be superimposed on the area base component, a water splash effect sub-layer should be mixed into the particle scattering component, and a raincoat appearance element should be attached to the character or equipment position.
[0239] Based on this, server 110 determines the environment adjustment parameters corresponding to each animation element in the target upgrade animation according to the parameter adjustment rules. Server 110 iterates through all animation components in the target upgrade animation description file, calculates the attributes and values that need to be adjusted for each component according to the parameter adjustment rules, such as color correction values, brightness correction values, and transparency curve offsets, and generates an environment adjustment parameter table, marking the adjustment content corresponding to each component. At the same time, server 110 determines the environment adaptation elements that need to be added to the target upgrade animation according to the environment adaptation rules, including the additional component types that need to be selected from the preset component library, the preset positions of each adaptation element in the scene, and their insertion intervals on the timeline.
[0240] After the above determination is completed, server 110 can apply the environment adjustment parameters to the attribute correction of existing components, and insert the environment adaptation elements into the corresponding positions of the target upgrade animation description file according to the rules, so as to generate the final upgrade animation adapted to the current environment state.
[0241] This embodiment achieves efficient mapping from environment state to upgrade animation adjustment scheme through a structured configuration and rule parsing mechanism of a preset environment strategy library. This avoids hard-coding each environment state and improves code maintainability and strategy configuration flexibility.
[0242] In one embodiment, the method further includes:
[0243] Determine the corresponding NPC behavior-driven strategy based on the region type;
[0244] Obtain the current status information of NPCs associated with the target area;
[0245] Generate corresponding behavior control instructions based on the NPC behavior-driven strategy and current state information;
[0246] Based on behavior control instructions, drive NPCs to perform target behaviors that are synchronized with the target upgrade animation.
[0247] In this embodiment, after generating the target upgrade animation or during the generation process, server 110 further determines the corresponding NPC (Non-Player Character) behavior-driven strategy based on the region type of the target region. The NPC behavior-driven strategy is pre-configured in the strategy library of server 110. Different region types have different NPC behavior-driven strategies, which are set based on the functional roles and behavioral characteristics of NPCs in different types of regions. For example, the NPC behavior-driven strategy matched for prison-type regions is the "Prisoner Alert Strategy," which drives nearby prisoner NPCs to perform reaction animations such as observing, pacing restlessly, approaching the iron bars to look, and retreating and crouching when the prison-type region is upgraded; the NPC behavior-driven strategy matched for commercial regions is the "Citizen Spectator Strategy," which drives nearby citizen NPCs to perform behaviors such as stopping to watch, cheering and clapping, and raising their hands to shield their eyes from the sun to look out; the NPC behavior-driven strategy matched for industrial regions is the "Worker Preparation Strategy," which drives nearby worker NPCs to perform actions such as pausing work, looking up, putting down tools, and waiting to be ready. The design of the strategy library ensures that the NPC's behavioral feedback and the functional attributes of the region form a semantic correspondence.
[0248] After determining the NPC behavior-driven strategy, server 110 obtains the current state information of NPCs associated with the target area. Each NPC maintains its own state data in the game system, including its current location coordinates, currently performing action, percentage of progress, movement speed, facing angle, and emotional state. Server 110 queries the NPC state management module to filter out NPCs that are related to the target area, i.e., NPCs located within or around a preset range of the target area, and obtains the current state data of these NPCs as input for behavior-driven calculations.
[0249] Based on this, server 110 generates corresponding behavior control instructions according to the NPC behavior-driven strategy and current state information. These instructions include information such as the type of target action the NPC needs to perform, the duration of the action, the target location, the speed change curve, and the trigger time. Specifically, server 110 compares the NPC's position coordinates in the current state information with the target behavior area defined in the behavior-driven strategy, calculates the movement path and time required for the NPC to move from its current location to the target location, and then combines this with the timeline of the target upgrade animation to determine the trigger time and duration of the NPC's behavior. For example, when upgrading a prison-type area, the "observe" behavior is assigned to the first half of the upgrade animation, the "pacing uneasily" behavior to the middle, and the "retreating and crouching" behavior to the climax of the later part of the upgrade animation. Server 110 generates a set of time-sequential behavior control instructions for each NPC to ensure that their behavior is precisely synchronized with the playback progress of the target upgrade animation.
[0250] Ultimately, server 110 drives the NPC to perform the target behavior synchronized with the target upgrade animation based on behavior control instructions. Server 110 sends the behavior control instructions to the NPC behavior engine on client 120, which triggers the NPC to execute the corresponding action sequence at the corresponding time points during the upgrade animation playback. Client 120 synchronously drives the NPC's behavior during the upgrade animation playback, and the timing of the NPC's actions is tightly coupled with each stage of the upgrade animation. For example, when the upgrade light effect appears on the ground in the prison area, nearby prisoner NPCs synchronously perform the action of approaching the iron bars and observing; when the light effect at the boundary of the area reaches its strongest, prisoner NPCs synchronously perform the action of retreating and crouching. After the upgrade animation finishes playing, the NPC behavior engine restores the NPC's state to the normal behavior mode.
[0251] This embodiment achieves cross-character interaction between NPC behavior and upgrade animations through a region-type driven NPC behavior differentiation strategy. This enables non-player characters to generate consistent feedback with region characteristics when the region is upgraded, enriching the scene dynamics during the upgrade animation. It avoids the thinness of upgrade animations that are limited to static building changes while surrounding characters remain indifferent, and enhances the overall vividness and realism of the virtual scene during the region upgrade process.
[0252] In one embodiment, the method further includes:
[0253] Get the media files uploaded by the user;
[0254] Parse the source files and extract the corresponding visual style data;
[0255] Based on the visual style data, the visual style parameters corresponding to at least one animation component in the upgraded style template are adjusted to obtain the updated upgraded style template.
[0256] In this embodiment, before or during the generation of the target upgrade animation, the server 110 further supports users uploading custom material files via the client 120. Users can select and submit local files through the material upload entry in the graphical user interface. After receiving the file, the server 110 performs format verification and storage. Material files can be image files, such as PNG or JPG format area reference images or decorative patterns; video files, such as MP4 format style demonstration clips; or preset theme configuration files, such as JSON format color theme packages or UI theme configuration files. The server 110 performs compliance verification on the format and size of the uploaded file. After successful verification, the file is stored in the user's personalized material storage area for subsequent parsing and retrieval.
[0257] After obtaining the user-uploaded media files, server 110 calls the media parsing engine to parse and process the files, extracting the corresponding visual style data. Visual style data refers to a set of structured parameters that characterize the visual features of the media. For image-based media, server 110 uses image analysis algorithms to extract data such as primary color tone, secondary color tone, color contrast, saturation distribution, and texture features. For example, from a warm-toned pastoral style reference image, the primary color tone is extracted as orange, the secondary colors as light yellow and brown, the saturation distribution is between 40% and 70%, and the texture roughness is medium. For video-based media, server 110 performs keyframe sampling and extracts average color features and dynamic rhythm reference values from multiple keyframes. For theme configuration files, server 110 directly reads the structured fields to obtain color values and style identifiers. Furthermore, server 110 can also extract the theme tendency of the media, categorizing it into modern, retro, natural, and technological styles based on the visual characteristics of the content.
[0258] After extracting the visual style data, server 110 adjusts the visual style parameters of at least one animation component in the upgrade style template based on the visual style data, resulting in an updated upgrade style template. Visual style parameters are configurable appearance attributes of each animation component in the upgrade style template, specifically including color values, texture style identifiers, gradient directions, preset transparency curves, and light effect color temperatures. Server 110 converts the extracted visual style data into a style parameter format recognizable by each component according to preset mapping rules. For example, it maps the main color tone to the gradient start color of the overlay mask component and the mainstream light color of the boundary light effect component; maps the auxiliary color to the particle color range of the particle scattering component and the text outline color of the identifier emergence component; and uses theme preference tags to adjust the shape style and overall light effect color temperature direction of the landmark highlighting component. After adjustment, server 110 writes the updated parameters back to the corresponding fields of the style template, generating a user-customized upgrade style template. This template can be saved to the user's personalized template library for reuse in subsequent upgrades of other areas for the same user.
[0259] Understandably, if the user-uploaded material files cannot yield valid visual style data, or if the extracted results severely conflict with the overall art style of the game, server 110 can return a prompt message to guide the user to re-upload, or use the default style parameters as a downgrade solution to ensure the normal generation of the upgrade animation.
[0260] This embodiment enables personalized customization of upgrade style templates by allowing users to upload custom materials and automatically extracting visual style data to update template parameters. This broadens the sources of upgrade animation visual styles, allowing different players to obtain differentiated and personalized upgrade animation performances based on their personal aesthetic preferences, and enhancing users' sense of participation and control over the game's visual style.
[0261] In one embodiment, the method further includes:
[0262] Get the animation display parameters input by the user;
[0263] Determine the corresponding animation quality configuration based on the animation display parameters;
[0264] Analyze the animation quality configuration and adjust the animation scale parameters, animation rhythm parameters, and / or animation rendering parameters of the target upgrade animation; among them, the animation rendering parameters are used to change the rendering precision of the target upgrade animation.
[0265] In this embodiment, after generating the target upgrade animation or during the generation process, the server 110 further obtains the animation display parameters input by the user through the client 120. The user can select animation display parameters in the settings panel of the graphical user interface, such as low quality mode, medium quality mode, or high quality mode, or drag the quality adjustment slider to input continuous display parameter values. After obtaining the user's input, the client 120 sends the corresponding animation display parameter information to the server 110.
[0266] After obtaining the animation display parameters input by the user, server 110 determines the corresponding animation quality configuration based on these parameters. Server 110 has multiple preset animation quality configuration levels, each corresponding to a set of preset animation parameter adjustment rules. For example, low quality configuration corresponds to performance priority mode, medium quality configuration corresponds to balanced mode, and high quality configuration corresponds to quality priority mode. The configuration parameters for each level are stored in the configuration management module of server 110. Different levels have different preset thresholds and adjustment coefficients in terms of animation scale parameters, animation rhythm parameters, and rendering precision to adapt to terminal devices with different performance levels and users' personalized preferences.
[0267] Based on this, server 110 analyzes the animation quality configuration and adjusts the animation scale parameters, animation rhythm parameters, and / or animation rendering parameters of the target upgrade animation. Specifically, server 110 scales or limits the animation scale parameters according to the preset rules in the animation quality configuration. For example, in low-quality configuration, the particle number multiplier is limited to no more than 0.5 times to reduce particle rendering overhead, and the size multiplier is limited to no more than 1.2 times to reduce the pixel burden of texture sampling. Regarding animation rhythm parameters, server 110 constrains the playback duration according to the quality configuration. For example, in low-quality configuration, the total playback duration of the animation can be appropriately shortened to reduce the continuous load on the GPU. Regarding animation rendering parameters, the rendering precision settings in the server 110's resolution quality configuration adjust the rendering precision parameters corresponding to each component in the target upgrade animation. Specifically, this includes the texture precision of the particle system, such as downsampling from 512×512 to 128×128 to reduce video memory usage; shadow resolution, such as reducing from 2048×2048 to 512×512 to reduce shadow calculation overhead; anti-aliasing level, such as reducing from 4x MSAA to off to improve frame rate; and the sampling precision of lighting effects and the on / off status of post-processing effects, etc.
[0268] After the adjustment is completed, server 110 sends the adjusted target upgrade animation description file to client 120 for rendering and playback. If the user subsequently adjusts the animation display parameters, server 110 can re-execute the adjustment process of this embodiment, dynamically update the animation quality configuration, and regenerate an upgrade animation adapted to the current display parameters.
[0269] This embodiment drives the dynamic switching of animation quality configuration through user-input animation display parameters, realizing adaptive adjustment of upgrade animations under different performance terminals and user preferences. While ensuring the core visual performance, it optimizes animation rendering performance and improves the smoothness of game operation and the flexibility of user experience under different hardware environments.
[0270] The following describes the dynamic generation apparatus for regional upgrade animations provided in the embodiments of this application. The dynamic generation apparatus for regional upgrade animations described below can be referred to in correspondence with the dynamic generation method for regional upgrade animations described above. Figure 6 As shown, this application provides a dynamic generation apparatus for regional upgrade animations, the apparatus comprising:
[0271] The regional attribute information acquisition module 210 is used to acquire the regional attribute information of the target region in response to the upgrade animation generation request of the target region. The regional attribute information includes at least the region area and the region type.
[0272] The initial upgrade animation generation module 220 is used to determine the target upgrade style template corresponding to the region type, and select the corresponding animation components based on the target upgrade style template to generate the initial upgrade animation;
[0273] The animation parameter determination module 230 is used to determine the animation scale parameters and animation rhythm parameters based on the area of the region.
[0274] The target upgrade animation generation module 240 is used to adjust the initial upgrade animation based on the animation scale parameters and animation rhythm parameters, and generate the target upgrade animation.
[0275] In one embodiment, the initial upgrade animation generation module 220 includes:
[0276] The regional spatial feature information acquisition submodule is used to acquire the regional spatial feature information of the target region;
[0277] The target template set retrieval submodule is used to retrieve the corresponding target template set based on the region type.
[0278] The target upgrade style template matching submodule is used to match the corresponding target upgrade style template from the target template set based on the regional spatial feature information.
[0279] In one embodiment, the target upgrade style template matching submodule includes:
[0280] The spatial feature parameter extraction unit is used to extract spatial feature parameters from the regional spatial feature information;
[0281] The matching degree calculation unit is used to calculate the matching degree between each upgraded style template in the target template set and the spatial feature parameters.
[0282] The target upgrade style template determination unit is used to select upgrade style templates that meet preset matching conditions as the corresponding target upgrade style templates.
[0283] In one embodiment, the initial upgrade animation generation module 220 includes:
[0284] The animation component selection submodule is used to select the corresponding animation component from the preset component library according to the component layout rules in the target upgrade style template;
[0285] The hierarchy determination submodule is used to parse the spatial and hierarchical relationships between animation components based on component layout rules;
[0286] The timing sequence determination submodule is used to determine the dependencies and timing sequence between animation components based on the animation splicing rules in the upgrade style template;
[0287] The initial upgrade animation generation submodule is used to combine various animation components based on spatial location relationships, hierarchical relationships, dependency relationships, and time arrangement relationships to generate the initial upgrade animation.
[0288] In one embodiment, the primary upgrade animation generation sub-model includes:
[0289] The spatial coordinate mapping unit is used to map spatial positional relationships into the spatial coordinates of each animation component within the target area;
[0290] The rendering hierarchy conversion unit is used to convert the hierarchy relationship into the rendering hierarchy of each animation component;
[0291] The execution time window generation unit is used to construct a directed acyclic graph between animation components according to their dependencies, and generate the execution time window of each animation component based on the directed acyclic graph and the time arrangement order.
[0292] The initial upgrade animation generation unit is used to combine various animation components based on spatial coordinates, rendering level, and execution time window to generate the initial upgrade animation.
[0293] In one embodiment, the animation parameter determination module 230 includes:
[0294] The area grade determination submodule is used to determine the area grade corresponding to the area of a region;
[0295] The animation scale parameter determination submodule is used to obtain the baseline scale parameter corresponding to the area level, and adjust the baseline scale parameter according to the deviation between the area of the region and the area range corresponding to the area level to obtain the animation scale parameter.
[0296] The animation rhythm parameter determination submodule is used to obtain the rhythm configuration template corresponding to the area level, and generate the animation rhythm parameters based on the rhythm configuration template.
[0297] In one embodiment, the animation scale parameter determination submodule includes:
[0298] The area range acquisition unit is used to acquire the area range corresponding to the area level;
[0299] The area correction ratio calculation unit is used to calculate the area difference between the area of the region and the lower limit of the area range, and to calculate the area correction ratio based on the area difference.
[0300] The animation scale parameter determination unit is used to adjust the spatial expansion range in the baseline scale parameter according to the area correction ratio to obtain the animation scale parameter.
[0301] In one embodiment, the animation rhythm parameter determination submodule includes:
[0302] The time mapping curve acquisition unit is used to acquire the time mapping curve corresponding to the rhythm configuration template;
[0303] The speed curve control point determination unit is used to determine the actual playback time axis positions corresponding to multiple key positions on the standardized time axis based on the time mapping curve, thereby obtaining multiple speed curve control points.
[0304] The playback speed coefficient determination unit is used to determine the playback speed coefficient corresponding to each animation stage based on multiple speed curve control points.
[0305] The animation rhythm parameter generation unit is used to generate animation rhythm parameters based on the speed curve control points and various playback speed coefficients.
[0306] In one embodiment, the target upgrade animation generation module 240 includes:
[0307] The target spatial location determination submodule is used to adjust the spatial coordinates of each animation component in the initial upgrade animation according to the animation scale parameters, so as to obtain the target spatial location of each animation component.
[0308] The target playback timing determination submodule is used to adjust the execution time window corresponding to each animation component in the initial upgrade animation according to the animation rhythm parameters, so as to obtain the target playback timing corresponding to each animation component;
[0309] The target upgrade animation generation submodule is used to generate target upgrade animations based on the target's spatial location and the target's playback sequence.
[0310] In one embodiment, the target spatial location determination submodule includes:
[0311] The spatial expansion range acquisition unit is used to obtain the spatial expansion range in the animation scale parameters;
[0312] The direction vector determination unit is used to determine the direction vector of each animation component relative to the center of the target area based on the spatial coordinates of each animation component in the initial upgrade animation.
[0313] The target offset determination unit is used to scale the vectors of each direction according to the spatial expansion range to obtain the target offset of each animation component.
[0314] The target spatial position calculation unit is used to calculate the target spatial position of each animation component based on the target offset.
[0315] In one embodiment, the target playback timing determination submodule includes:
[0316] The time mapping relationship construction unit is used to construct a time mapping relationship between the standardized time axis and the actual playback time axis based on the speed curve control points in the animation rhythm parameters and the playback speed coefficients corresponding to each animation stage.
[0317] The target execution time window determination unit is used to map the execution time window corresponding to each animation component to the actual playback time axis according to the time mapping relationship, so as to obtain the target execution time window corresponding to each animation component;
[0318] The target playback timing generation unit is used to generate the target playback timing based on the execution time window of each target.
[0319] In one embodiment, the apparatus further includes:
[0320] The environmental status information acquisition module is used to acquire the environmental status information corresponding to the target area;
[0321] The environment adaptation element determination module is used to determine the corresponding environment adjustment parameters and environment adaptation elements based on the environment status information.
[0322] The target upgrade animation update module is used to adjust the animation elements in the target upgrade animation according to the environment adjustment parameters, and update the target upgrade animation according to the environment adaptation elements.
[0323] In one embodiment, the environment adaptation element determination module includes:
[0324] The environment adjustment strategy matching submodule is used to match the corresponding environment adjustment strategy from the preset environment strategy library based on the environment status information.
[0325] The environment adaptation rule determination submodule is used to determine parameter adjustment rules and environment adaptation rules based on the environment adjustment strategy.
[0326] The Environment Adjustment Parameter Determination submodule is used to determine the environment adjustment parameters corresponding to the animation elements in the target upgrade animation according to the parameter adjustment rules.
[0327] The Environment Adaptation Element Determination submodule is used to determine the environment adaptation elements corresponding to the target upgrade animation based on the environment adaptation rules.
[0328] In one embodiment, the apparatus further includes:
[0329] The NPC behavior-driven strategy determination module is used to determine the corresponding NPC behavior-driven strategy based on the region type.
[0330] The current status information acquisition module is used to acquire the current status information of NPCs associated with the target area;
[0331] The behavior control instruction generation module is used to generate corresponding behavior control instructions based on the NPC behavior driving strategy and current state information.
[0332] The target behavior-driven module is used to drive NPCs to perform target behaviors that are synchronized with the target upgrade animation, based on behavior control instructions.
[0333] In one embodiment, the apparatus further includes:
[0334] The media file acquisition module is used to acquire media files uploaded by users;
[0335] The visual style data extraction module is used to parse the source files and extract the visual style data corresponding to the source files.
[0336] The visual style parameter adjustment module is used to adjust the visual style parameters of at least one animation component in the upgraded style template based on the visual style data, so as to obtain the updated upgraded style template.
[0337] In one embodiment, the apparatus further includes:
[0338] The animation display parameter acquisition module is used to acquire the animation display parameters input by the user.
[0339] The animation quality configuration determination module is used to determine the corresponding animation quality configuration based on the animation display parameters;
[0340] The animation quality configuration parsing module is used to parse the animation quality configuration and adjust the animation scale parameters, animation rhythm parameters, and / or animation rendering parameters of the target upgrade animation; among them, the animation rendering parameters are used to change the rendering precision of the target upgrade animation.
[0341] In one embodiment, this application also provides a storage medium storing computer-readable instructions that, when executed by one or more processors, cause the one or more processors to perform the steps of the dynamic generation method for region upgrade animation as described in any of the above embodiments.
[0342] In one embodiment, this application also provides a computer device storing computer-readable instructions that, when executed by one or more processors, cause the one or more processors to perform the steps of the dynamic generation method for region upgrade animation as described in any of the above embodiments.
[0343] Indicatively, such as Figure 7 As shown, Figure 7 This is a schematic diagram of the internal structure of a computer device 300 provided in an embodiment of this application. The computer device 300 can be provided as a server. (Refer to...) Figure 7 The computer device 300 includes a processing component 302, which further includes one or more processors, and memory resources represented by memory 301 for storing instructions, such as application programs, that can be executed by the processing component 302. The application programs stored in memory 301 may include one or more modules, each corresponding to a set of instructions. Furthermore, the processing component 302 is configured to execute instructions to perform the dynamic generation method of region upgrade animations of any of the above embodiments.
[0344] The computer device 300 may also include a power supply component 303 configured to perform power management of the computer device 300, a wired or wireless network interface 304 configured to connect the computer device 300 to a network, and an input / output (I / O) interface 305. The computer device 300 may operate on an operating system stored in memory 301, such as Windows Server™, Mac OS X™, Unix™, Linux™, Free BSD™, or similar.
[0345] Those skilled in the art will understand that Figure 7 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0346] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element. In this document, "a," "an," "the," "the," and "its" may also include plural forms unless the context clearly indicates otherwise. "Multiple" refers to at least two, such as 2, 3, 5, or 8, etc. "And / or" includes any and all combinations of the related listed items.
[0347] The various embodiments in this specification are described in a progressive manner. Each embodiment focuses on the differences from other embodiments. The various embodiments can be combined as needed, and the same or similar parts can be referred to each other.
[0348] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for dynamically generating regional upgrade animations, characterized in that, The method includes: In response to the upgrade animation generation request for the target area, the region attribute information of the target area is obtained, and the region attribute information includes at least the region area and the region type; Match the target upgrade style template corresponding to the region type, and select the corresponding animation component based on the target upgrade style template to generate the initial upgrade animation; Based on the area of the region, determine the animation scale parameters and animation rhythm parameters; Based on the animation scale parameters and the animation rhythm parameters, the initial upgrade animation is adjusted to generate the target upgrade animation.
2. The method according to claim 1, characterized in that, The step of determining the target upgrade style template corresponding to the region type includes: Obtain the regional spatial feature information of the target area; Based on the region type, obtain the corresponding target template set; Based on the regional spatial feature information, a corresponding target upgrade style template is matched from the target template set.
3. The method according to claim 2, characterized in that, The step of matching a corresponding target upgrade style template from the target template set based on the regional spatial feature information includes: Extract spatial feature parameters from the spatial feature information of the region; Calculate the matching degree between each upgraded style template in the target template set and the spatial feature parameters; The upgrade style template that meets the preset matching conditions is used as the corresponding target upgrade style template.
4. The method according to claim 1, characterized in that, The step of selecting the corresponding animation component based on the target upgrade style template and generating the initial upgrade animation includes: Based on the component layout rules in the target upgrade style template, select the corresponding animation component from the preset component library; Based on the component layout rules, the spatial positional relationships and hierarchical relationships between the animation components are analyzed; Based on the animation splicing rules in the upgraded style template, determine the dependencies and timing order between the animation components; Based on the spatial location relationship, the hierarchical relationship, the dependency relationship, and the temporal arrangement relationship, the animation components are combined to generate the initial upgrade animation.
5. The method according to claim 4, characterized in that, The step of combining the animation components according to the spatial position relationship, the hierarchical relationship, the dependency relationship, and the temporal arrangement relationship to generate the initial upgrade animation includes: The spatial positional relationships are mapped to the spatial coordinates of each animation component within the target area; The hierarchical relationship is converted into the rendering hierarchy of each animation component; Based on the aforementioned dependencies, a directed acyclic graph is constructed among the animation components, and an execution time window for each animation component is generated according to the directed acyclic graph and the time arrangement order. Based on the spatial coordinates, the rendering level, and the execution time window, the animation components are combined to generate the initial upgrade animation.
6. The method according to claim 1, characterized in that, The step of determining the animation scale parameters and animation rhythm parameters based on the area of the region includes: Determine the area level corresponding to the area of the region; Obtain the baseline scale parameter corresponding to the area level, and adjust the baseline scale parameter according to the deviation between the area of the region and the area range corresponding to the area level to obtain the animation scale parameter; Obtain the rhythm configuration template corresponding to the area level, and generate animation rhythm parameters based on the rhythm configuration template.
7. The method according to claim 6, characterized in that, The step of adjusting the baseline scale parameter based on the deviation between the area of the region and the area interval corresponding to the area level to obtain the animation scale parameter includes: Obtain the area range corresponding to the area level; Calculate the area difference between the area of the region and the lower limit of the area range, and calculate the area correction ratio based on the area difference; Based on the area correction ratio, the spatial expansion range in the baseline scale parameter is adjusted to obtain the animation scale parameter.
8. The method according to claim 6, characterized in that, The step of generating animation rhythm parameters based on the rhythm configuration template includes: Obtain the time mapping curve corresponding to the rhythm configuration template; Based on the time mapping curve, the actual playback time axis positions corresponding to multiple key positions on the standardized time axis are determined, and multiple speed curve control points are obtained. Based on the multiple speed curve control points, determine the playback speed coefficient corresponding to each animation stage; Animation rhythm parameters are generated based on the speed curve control points and the playback speed coefficients.
9. The method according to claim 1, characterized in that, The step of adjusting the initial upgrade animation based on the animation scale parameters and the animation rhythm parameters to generate the target upgrade animation includes: Based on the animation scale parameters, the spatial coordinates corresponding to each animation component in the initial upgrade animation are adjusted to obtain the target spatial position corresponding to each animation component; Based on the animation rhythm parameters, adjust the execution time window corresponding to each animation component in the initial upgrade animation to obtain the target playback sequence corresponding to each animation component; Based on the target's spatial location and the target's playback sequence, generate a target upgrade animation.
10. The method according to claim 9, characterized in that, The step of adjusting the spatial coordinates of each animation component in the initial upgrade animation according to the animation scale parameter to obtain the target spatial position of each animation component includes: Obtain the spatial expansion range from the animation scale parameters; Based on the spatial coordinates of each animation component in the initial upgrade animation, determine the direction vector of each animation component relative to the center of the target area; Based on the spatial expansion range, each of the direction vectors is scaled to obtain the target offset corresponding to each of the animation components; Calculate the target spatial position corresponding to each animation component based on the target offset.
11. The method according to claim 9, characterized in that, The step of adjusting the execution time window corresponding to each animation component in the initial upgrade animation according to the animation rhythm parameters to obtain the target playback sequence corresponding to each animation component includes: Based on the speed curve control points in the animation rhythm parameters and the playback speed coefficients corresponding to each animation stage, a time mapping relationship between the standardized time axis and the actual playback time axis is constructed. Based on the time mapping relationship, the execution time window corresponding to each animation component is mapped to the actual playback timeline to obtain the target execution time window corresponding to each animation component; The target playback sequence is generated based on the execution time window of each target.
12. The method according to claim 1, characterized in that, The method further includes: Obtain the environmental status information corresponding to the target area; Based on the environmental status information, determine the corresponding environmental adjustment parameters and environmental adaptation elements; Based on the environmental adjustment parameters, the animation elements in the target upgrade animation are adjusted, and the target upgrade animation is updated based on the environmental adaptation elements.
13. The method according to claim 12, characterized in that, The step of determining the corresponding environmental adjustment parameters and environmental adaptation elements based on the environmental state information includes: Based on the environmental status information, a corresponding environmental adjustment strategy is matched from the preset environmental strategy library; Based on the aforementioned environment adjustment strategy, determine the parameter adjustment rules and environment adaptation rules; Based on the parameter adjustment rules, determine the environmental adjustment parameters corresponding to the animation elements in the target upgrade animation; Based on the environment adaptation rules, determine the environment adaptation elements corresponding to the target upgrade animation.
14. The method according to claim 1, characterized in that, The method further includes: Based on the region type, determine the corresponding NPC behavior driving strategy; Obtain the current status information of the NPCs associated with the target area; Based on the NPC behavior-driven strategy and the current state information, generate corresponding behavior control instructions; According to the behavior control instructions, the NPC is driven to perform target behaviors that are synchronized with the target upgrade animation.
15. The method according to claim 1, characterized in that, The method further includes: Get the media files uploaded by the user; Parse the source file and extract the corresponding visual style data; Based on the visual style data, the visual style parameters corresponding to at least one animation component in the upgraded style template are adjusted to obtain the updated upgraded style template.
16. The method according to any one of claims 1 to 15, characterized in that, The method further includes: Get the animation display parameters input by the user; Based on the animation display parameters, determine the corresponding animation quality configuration; The animation quality configuration is analyzed, and the animation scale parameters, animation rhythm parameters, and / or animation rendering parameters of the target upgrade animation are adjusted; wherein, the animation rendering parameters are used to change the rendering precision of the target upgrade animation.
17. A dynamic generation device for regional upgrade animation, characterized in that, The device includes: The regional attribute information acquisition module is used to acquire the regional attribute information of the target region in response to the upgrade animation generation request of the target region. The regional attribute information includes at least the region area and the region type. The initial upgrade animation generation module is used to determine the target upgrade style template corresponding to the region type, and select the corresponding animation components based on the target upgrade style template to generate the initial upgrade animation; An animation parameter determination module is used to determine the animation scale parameters and animation rhythm parameters based on the area of the region. The target upgrade animation generation module is used to adjust the initial upgrade animation according to the animation scale parameters and the animation rhythm parameters to generate the target upgrade animation.
18. A storage medium, characterized in that: The storage medium stores computer-readable instructions that, when executed by one or more processors, cause the one or more processors to perform the steps of the dynamic generation method for region upgrade animation as described in any one of claims 1 to 16.
19. A computer device, characterized in that, include: One or more processors, and memory; The memory stores computer-readable instructions that, when executed by the one or more processors, perform the steps of the dynamic generation method for region upgrade animation as described in any one of claims 1 to 16.