A method, system, device and medium for constructing a three-dimensional effect model library
Patent Information
- Application Number
- CN202611019710.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-09
- Publication Date
- 2026-10-16
AI Technical Summary
[0007]为了解决现有技术中在进行三维仿真时,存在时序维度缺失、语义封装缺失和系统级协同缺失的问题,本发明提供一种构建三维效果模型库的方法、系统、设备及介质
[0062] This invention provides a method, system, device, and medium for constructing a 3D effect model library. The method, based on 3D special effects assets and effect description files, employs call constraints to construct 3D effect models. Based on the event to be simulated, it matches and adapts the 3D effect models, generating a candidate set of effects. The effect description files decouple the calling logic of the 3D special effects assets from the event to be simulated, enabling the same 3D special effects asset to adapt to different simulation events under different effect description file constraints. This improves the reusability of 3D special effects assets and reduces the workload of repeatedly creating similar special effects resources. The method calculates the comprehensive fit between the 3D effect model and the event to be simulated through event parameter matching degree, context matching degree, resource load adaptation degree, and viewpoint visibility matching degree, enabling the creation of a candidate 3D effect model library. The effect model selects the target effect model that is more suitable for the current event, current scene, and current resource load state, thereby improving the accuracy and adaptability of effect invocation. Through an effect instance scheduling mechanism based on an instance queue, the birth time, expected end time, branch identifier, spatial transformation parameters, material parameters, playback progress parameters, and display status of effect instances are incorporated into unified management. This enables effect instances to support snapshot saving, state rollback, branch deduction, and branch comparison display, thereby reducing the risk of effect instance misalignment, omission, or misdisplay during deduction playback or state rollback. Through lifecycle linkage rules, effect instances can be controlled and linked with simulation logic, physical approximation calculation, and state management during the startup, running, ending, or recycling phases. Therefore, the 3D effect model is not only used for visual display but also serves as a component of the simulation event state expression and visualization management of the deduction process.
Smart Images

Figure CN122929071A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of three-dimensional simulation and deduction technology, specifically relating to a method, system, device, and medium for constructing a three-dimensional effect model library. Background Technology
[0002] Currently, the implementation of 3D special effects mainly relies on the particle systems, shaders, and animation tools provided by game engines (such as Unity and Unreal Engine). In the simulation field, the common strategy is to directly reuse or simply adapt the special effects resources of these engines. A common practice is to create special effects as "prefabs" and instantiate and play them when specific game logic events (such as collision detection) are detected by writing scripts. Some professional simulation systems attempt to build internal special effects resource libraries and call them through keywords or unique identifiers (IDs). For example, when the simulation logic determines that an "explosion" has occurred, a corresponding explosion prefab is matched and loaded from the resource library based on the location and intensity parameters of the event and played. To further optimize performance, some solutions introduce "object pooling" technology to reuse frequently used special effects instances and avoid the overhead of frequent creation and destruction.
[0003] Despite the aforementioned practices, existing solutions are essentially static and shallow mappings of "events and resources," and they fall short of the requirements for advanced simulation and deduction in three fundamental ways:
[0004] Missing temporal dimension: Existing solutions only focus on "real-time playback" and completely ignore the simulation system's need for advanced temporal operations such as "pause", "speed up", "roll back to any point in time" and "create parallel simulation branches". The special effects system does not have time awareness and state management capabilities.
[0005] Lack of semantic encapsulation: Special effects are treated as isolated resource packages with only visual attributes. There is no structured and configurable association model between them and the rich business semantics of simulation events (such as damage level, interference type, and instruction source), resulting in extremely poor adaptability.
[0006] Lack of system-level collaboration: Special effects systems are usually designed as an auxiliary function of the rendering module and fail to serve as a first-level core subsystem of the simulation engine, failing to engage in equal and in-depth two-way interaction and collaboration with key modules such as instruction chain management, global state management, and resource scheduling. Summary of the Invention
[0007] To address the issues of missing temporal dimensions, semantic encapsulation, and system-level collaboration in existing 3D simulation technologies, this invention provides a method, system, device, and medium for constructing a 3D effect model library.
[0008] To achieve the above objectives, the present invention provides the following technical solution:
[0009] In a first aspect, embodiments of this disclosure provide a method for constructing a three-dimensional effect model library, comprising the following steps:
[0010] Step S1: Based on the 3D special effects assets and effect description files, construct a 3D effect model using call constraints;
[0011] Step S2: Based on the event to be simulated, match the appropriate 3D effect model and generate an effect candidate set;
[0012] Step S3: Filter the candidate effect set based on necessary conditions to obtain the filtered three-dimensional effect model. Calculate the comprehensive fit between the three-dimensional effect model and the event to be simulated based on event parameter matching degree, context matching degree, resource load adaptability, and viewpoint visibility matching degree. Select at least one three-dimensional effect model as the target effect model based on the comprehensive fit.
[0013] Step S4: Bind the simulation event parameters, inference context and adjustable parameter set in the effect description file of the event to be simulated, generate parameter binding results, input the parameter binding results into at least one target effect model, generate effect instances, and build an effect instance scheduling mechanism based on instance queue;
[0014] Step S5: Based on the effect instance scheduling mechanism, select at least one effect instance in the instance queue for visualization rendering, and perform lifecycle linkage based on the rendering data of the effect instance.
[0015] Furthermore, the 3D special effects assets are visual resources loaded and displayed by the 3D rendering module, including one or more of the following: 3D models, particle effects, materials, animations, trajectory lines, icons, annotations, and sound cues;
[0016] The effect description file is used to provide event semantics, invocation rules, and lifecycle rules for 3D special effects assets, and includes at least: an effect identifier field, an effect category field, an event matching rule field, a rendering resource list field, an adjustable parameter set field, a lifecycle linkage rule field, a resource type tag field, a performance level tag field, and a version identifier field. Specifically: the effect identifier field uniquely identifies the 3D effect model; the effect category field describes the effect category of the 3D effect model, including link building, target detection, electronic warfare, firepower strike, damage effects, and entity maneuvering; the event matching rule field defines the simulation event types, simulation event parameters, and the range of simulation event parameters that the 3D effect model adapts to; and the rendering resource list field... The single field is used to record 3D special effects assets at different levels of detail. The adjustable parameter set field is used to declare parameters that can be overridden by simulation events or inference context when called. The lifecycle linkage rule field is used to record the interaction rules between the effect instance and the simulation logic, physical approximation calculation and state management during the startup, running, ending or recycling phases. The resource type label field is used to identify the resource types involved in the 3D effect model. Resource types include particle resources, model resources, line segment resources, material resources and animation resources. The performance level label field is used to describe the resource consumption, recommended display distance and applicable load status of the 3D effect model at different levels of detail. The version identifier field is used to describe the version information of the effect description file and associated rendering resources.
[0017] The calling constraints are used to describe the resource consumption, visibility, level of detail, and scheduling limitations of the 3D effect model in a specific simulation environment;
[0018] The 3D effect model also includes an index unit. The index unit constructs an event index, an effect index, a resource index, and a performance index based on the effect identifier field, effect category field, event matching rule field, rendering resource list field, resource type label field, performance level label field, and version identifier field. Specifically, the event index is constructed based on the event matching rule field and is used to retrieve potentially suitable 3D effect models when a simulation event occurs. The effect identifier index is constructed based on the effect identifier field and is used to directly access the specified 3D effect model. The resource index is constructed based on the rendering resource list field and resource type label field and is used for resource loading, resource reuse, and resource unloading. The performance index is constructed based on the performance level label field and is used to select high detail level, low detail level, or simplified effect under different load conditions.
[0019] Furthermore, the generation of the effect candidate set includes the following steps:
[0020] Based on the simulation event parameters of the event to be simulated, at least one suitable 3D effect model is selected through the index unit. The simulation event parameters include: event occurrence time, event type, event source object, event target object, event spatial location, event parameters, and the identifier of the simulation branch to which it belongs.
[0021] The event matching rule field of the matched 3D effect model is compared with the simulation event parameters, and 3D effect models with the same rendering effect type are selected as the effect candidate set.
[0022] Furthermore, when filtering the candidate effect set based on necessary conditions to obtain the filtered 3D effect model, the process includes:
[0023] The three-dimensional effect models in the effect candidate set are verified before being called. The verification selects candidate three-dimensional effect models that have the basis for being called based on necessary conditions, and is used to determine whether the candidate three-dimensional effect models have the basic conditions for being actually called.
[0024] The necessary conditions include event type consistency, necessary parameter completeness, parameter values, and effect category. During the screening process, 3D effect models with event type consistency, necessary parameter completeness, and parameter values within the allowable range defined by the effect description file, and whose effect category is adapted to the current specific simulation scene, are selected as the filtered 3D effect models.
[0025] The overall fit This is used to represent the overall fit between the filtered 3D model and the simulated event in terms of event parameters, inference context, resource load, and viewpoint. The overall fit is... include:
[0026] ;
[0027] In the formula, For event parameter matching degree; For context matching degree; For resource load adaptability; Viewpoint visibility matching degree; , , and These represent the weighting coefficients for event parameter matching, context matching, resource load adaptability, and viewpoint visibility matching, respectively. , , and All are greater than 0, and ;
[0028] When selecting at least one 3D effect model as the target effect model based on overall fit, the following are included:
[0029] When overall fit At this time, it allows the use of the currently filtered 3D effect model;
[0030] when At this time, it allows the use of a low-detail version or a simplified version of the currently filtered 3D model;
[0031] When overall fit At that time, the currently filtered 3D effect model will not be invoked.
[0032] Furthermore, the effect instance includes at least an effect identifier, resource reference, birth time, expected end time, associated simulation branch identifier, spatial transformation parameters, material parameters, playback progress, current display status, and parameter binding results. The birth time is determined by the occurrence time of the simulation event corresponding to the trigger effect instance. The expected end time is determined by the duration, end condition, or lifecycle linkage rule fields in the effect description file. For continuous display effect instances, the expected end time is determined by the corresponding simulation state release time, link disconnection time, target state change time, or user shutdown time.
[0033] The effect instance scheduling mechanism includes building an instance queue, snapshot saving, and state rollback. When building the instance queue, at least one corresponding effect instance is created according to the occurrence time of the current event to be simulated and written into the instance queue. The instance queue sorts the effect instances according to their birth time and expected end time.
[0034] When saving a snapshot, the current instance queue is traversed, and the complete state of each effect instance is written into the snapshot data. The complete state includes the effect identifier, the identifier of the deduction branch to which it belongs, the birth time, the expected end time, the spatial transformation parameters, the material parameters, the playback progress, the parameter binding result, and the current display status.
[0035] When performing a state rollback, terminate effect instances whose birth time is later than the target rollback time, clean up effect instances whose expected end time is no later than the target rollback time, select effect instances whose birth time is no later than the target rollback time and whose expected end time is later than the target rollback time from the instance queue, read and visualize the state of the corresponding effect instance from the snapshot save, and complete the state rollback based on the target rollback time.
[0036] Furthermore, the effect instance scheduling mechanism also includes branch deduction. When performing branch deduction, a deduction branch is created in the instance queue formed on the main deduction link based on historical snapshots or historical states. The deduction branch forms a new effect instance based on new instructions, parameters, action routes, target objects and / or deduction rules.
[0037] Furthermore, when selecting at least one effect instance for visualization rendering from the instance queue, the selected effect instance should simultaneously meet the following conditions:
[0038] Condition 1: The birth time of the effect instance is no later than the current simulation time, and the expected end time is later than the current simulation time.
[0039] Condition 2: The effect instance belongs to the current activity's projection branch, or belongs to the projection branch that the user specified to participate in the current comparison display;
[0040] Condition 3: The effect instance has completed resource loading, or has alternative low-level detail resources;
[0041] Condition 4: The effect instance is within the visible range of the current viewpoint, or it is not in the center of the current field of view but belongs to a high-priority event;
[0042] Condition 5: The effect instance has not been paused, rolled back, or marked as undisplayable by the resource reclamation process;
[0043] The selected effect instance, when being visualized and rendered, includes the following steps:
[0044] The rendering data includes the resource references, spatial transformation parameters, material parameters, playback progress parameters, and display layer parameters of the effect instance; among which:
[0045] The resource references are derived from the rendering resource list in the effect description file, and the loading results of the rendering resource list;
[0046] The spatial transformation parameters are used to determine the position, pose, scaling, range of action, motion path or connection relationship of the effect instance in the 3D scene. The spatial transformation parameters are generated by combining one or more event parameters, object state parameters and runtime state parameters according to the effect type.
[0047] The material parameters are derived from parameter binding results, inference context, damage level, interference intensity, link status, or lifecycle progress, and are used to control color, transparency, brightness, texture, line width, flicker frequency, or particle display style.
[0048] The playback progress parameter is derived from the difference between the current simulation time and the birth time of the effect instance; the display level parameter is determined based on the current viewpoint distance, the importance level of the effect, the system rendering quality strategy, and the current resource load status.
[0049] Based on the rendered data, lifecycle linkage is executed. Lifecycle linkage includes physical approximation linkage rules and logical state linkage rules. The physical approximation linkage rules are used to generate a one-time pulse displacement of the target object within the effect range when an effect instance such as explosion, impact, debris scattering, or blast wave diffusion is started, according to the effect center, radius of action, effect intensity, and attenuation relationship. The logical state linkage rules are used to send a state update message to the simulation logic module when an effect instance is started, reaches a key playback progress, or ends playback, in order to change the visible state, damage state, link state, or task state of the target object.
[0050] In a second aspect, embodiments of this disclosure provide a system for constructing a library of three-dimensional effect models, comprising:
[0051] The initialization unit is configured to build a 3D effect model based on 3D special effects assets and effect description files, using call constraints;
[0052] The preprocessing unit is configured to match and adapt the 3D effect model based on the event to be simulated and generate a set of effect candidates;
[0053] The selection unit is configured to filter the candidate effect set based on necessary conditions to obtain a filtered three-dimensional effect model, calculate the comprehensive fit between the three-dimensional effect model and the event to be simulated based on event parameter matching degree, context matching degree, resource load adaptability and viewpoint visibility matching degree, and select at least one three-dimensional effect model as the target effect model based on the comprehensive fit degree.
[0054] The scheduling unit is configured to bind the simulation event parameters, inference context and adjustable parameter set in the effect description file of the event to be simulated, generate parameter binding results, input the parameter binding results into at least one target effect model, generate effect instances, and construct an effect instance scheduling mechanism based on instance queues.
[0055] The rendering unit is configured to select at least one effect instance in the instance queue for visualization rendering based on the effect instance scheduling mechanism, and to perform lifecycle linkage based on the rendering data of the effect instance.
[0056] In a third aspect, embodiments of this disclosure provide an electronic device, characterized in that the electronic device comprises:
[0057] At least one processor; and,
[0058] The memory is communicatively connected to the at least one processor; wherein,
[0059] The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method for constructing a 3D effect model library.
[0060] In a fourth aspect, embodiments of this disclosure provide a non-transitory computer-readable storage medium, characterized in that the non-transitory computer-readable storage medium stores computer instructions for causing the computer to execute the method for constructing a three-dimensional effect model library.
[0061] Compared with the prior art, the present invention has the following beneficial technical effects:
[0062] This invention provides a method, system, device, and medium for constructing a 3D effect model library. The method, based on 3D special effects assets and effect description files, employs call constraints to construct 3D effect models. Based on the event to be simulated, it matches and adapts the 3D effect models, generating a candidate set of effects. The effect description files decouple the calling logic of the 3D special effects assets from the event to be simulated, enabling the same 3D special effects asset to adapt to different simulation events under different effect description file constraints. This improves the reusability of 3D special effects assets and reduces the workload of repeatedly creating similar special effects resources. The method calculates the comprehensive fit between the 3D effect model and the event to be simulated through event parameter matching degree, context matching degree, resource load adaptation degree, and viewpoint visibility matching degree, enabling the creation of a candidate 3D effect model library. The effect model selects the target effect model that is more suitable for the current event, current scene, and current resource load state, thereby improving the accuracy and adaptability of effect invocation. Through an effect instance scheduling mechanism based on an instance queue, the birth time, expected end time, branch identifier, spatial transformation parameters, material parameters, playback progress parameters, and display status of effect instances are incorporated into unified management. This enables effect instances to support snapshot saving, state rollback, branch deduction, and branch comparison display, thereby reducing the risk of effect instance misalignment, omission, or misdisplay during deduction playback or state rollback. Through lifecycle linkage rules, effect instances can be controlled and linked with simulation logic, physical approximation calculation, and state management during the startup, running, ending, or recycling phases. Therefore, the 3D effect model is not only used for visual display but also serves as a component of the simulation event state expression and visualization management of the deduction process. Attached Figure Description
[0063] Figure 1 A flowchart 100 of a method for constructing a three-dimensional effect model library according to an embodiment of the present disclosure is shown;
[0064] Figure 2 This diagram illustrates the relationship between the effect description file and the 3D special effects assets in an embodiment of this disclosure.
[0065] Figure 3 The flowchart of the target effect model based on necessary condition filtering, comprehensive fit calculation and threshold judgment in the embodiments of this disclosure is shown.
[0066] Figure 4 Figure 1000 illustrates an apparatus for constructing a three-dimensional effect model library according to an embodiment of the present disclosure. Detailed Implementation
[0067] The embodiments of the present invention will now be described in detail with reference to the accompanying drawings.
[0068] Figure 1 A flowchart 100 illustrating a method for constructing a 3D effect model library according to an embodiment of this disclosure is shown, as follows: Figure 1 As shown, it includes the following steps:
[0069] In step S101, a 3D effect model is constructed based on the 3D special effects assets and effect description files, using call constraints.
[0070] Specifically, the 3D special effects assets are visual resources loaded and displayed by the 3D rendering module, including one or more of the following: 3D models, particle effects, materials, animations, trajectory lines, icons, annotations, and sound prompts. Different 3D special effects assets are associated with corresponding effect categories and simulation event types through effect description files.
[0071] For example, 3D effect models can be explosion models, link construction models, and target detection models. Explosion models belong to the damage effects or fire strike categories and are typically matched with fire hit events, damage events, or impact events. Their 3D effect assets can include explosion particles, smoke materials, debris models, and semi-transparent shockwave patches. Link construction models belong to the link construction category and are typically matched with link establishment events, link interruption events, link recovery events, or communication status change events. Their 3D effect assets can include link segments, node identifiers, flow animations, and communication status colors. Target detection models belong to the target detection category and are typically matched with target discovery events, target locking events, or detection range update events. Their 3D effect assets can include cone-shaped scan areas, target locking boxes, and highlighted outlines. Through these correspondences, 3D effect assets are no longer used as isolated visual resources but are instead used to form callable 3D effect models through effect description files and specific simulation events and effect categories.
[0072] The effect description file is used to provide event semantics, invocation rules, and lifecycle rules for 3D special effects assets, and includes at least: an effect identifier field, an effect category field, an event matching rule field, a rendering resource list field, an adjustable parameter set field, a lifecycle linkage rule field, a resource type label field, a performance level label field, and a version identifier field, wherein:
[0073] The effect identifier field is used to uniquely identify the 3D effect model, and the effect category field is used to describe the effect category of the 3D effect model. The effect categories include link construction, target detection, electronic warfare, firepower strike, damage effect, and physical maneuver, and can also be expanded to other categories as needed by the system.
[0074] The event matching rule field defines the simulation event types, simulation event parameters, and the range of simulation event parameters that the 3D effect model adapts to. For example, a fire hit event needs to include the event type, hit location, target object, damage level, and occurrence time. The hit location can be derived from the hit determination result or the spatial state of the target object; the target object can be derived from the simulation object identifier; the damage level can be derived from the simulation logic calculation result or user-configured rules; and the occurrence time can be derived from the current simulation time. An electronic interference event needs to include the interference source, interference range, interference intensity, and duration. The interference source can be derived from the event source object; the interference range and interference intensity can be derived from the interference model calculation result or event parameters; and the duration can be derived from the effect description file, the inference context, or the event triggering rules. Therefore, the event matching rule field limits which event parameters the 3D effect model needs to read, and the range or conditions that these parameters should meet.
[0075] The rendering resource list field is used to record 3D special effects assets at different levels of detail. These 3D special effects assets at different levels of detail can be implemented using level-of-detail technology. Level-of-detail technology refers to configuring multiple resource versions with different resource consumption and display precision for the same 3D effect model. The system can select high-level, low-level, or simplified effect resources based on one or more factors, including the current viewpoint distance, the display proportion of the effect on the screen, the current system resource load, the importance level of the effect, and the rendering quality strategy.
[0076] For example, when the effect instance is close to the current viewpoint, occupies a large portion of the screen, and the system load is low, the system can select high-level detail resources; when the effect instance is far from the current viewpoint, occupies a small portion of the screen, or the system load is high, the system can select low-level detail resources or simplified effect resources. Through this method, the rendering resource manifest field can support resource switching for 3D effect models under different display distances and load conditions.
[0077] The adjustable parameter set field is used to declare parameters that can be overridden by the simulation event or deduction context when called, including effect size, duration, color, transparency, number of particles, line width, flashing frequency, damage level display style, etc., and records their default values and allowed ranges.
[0078] The lifecycle linkage rule field is used to record the interaction rules between the effect instance and the simulation logic, physical approximation calculation and state management during the startup phase, running phase, ending phase or recycling phase. For example, when the explosion effect is started, a visual impact prompt is generated; when the damage effect ends, the target object is notified to update its state; when the link interruption effect is started, the link display state is changed.
[0079] The resource type label field is used to identify the resource types involved in the 3D effect model. Resource types include particle resources, model resources, line segment resources, material resources, and animation resources.
[0080] The performance level label field is used to describe the resource consumption, recommended display distance, and applicable load status of the 3D effect model at different detail levels.
[0081] The version identifier field is used to describe the version information of the effect description file and associated rendering resources.
[0082] It should be noted that the effect description file describes under what simulation events the 3D special effects asset is invoked, how parameters are configured during invocation, how its lifecycle is managed, when it participates in rendering, when it is recycled, and whether it triggers simulation logic linkage. Therefore, the effect description file and the 3D special effects asset are directly bound together; the 3D special effects asset provides the visual presentation, while the effect description file provides the event semantics, invocation rules, and lifecycle rules.
[0083] The calling constraints are used to describe the resource consumption, visibility, level of detail, and scheduling limitations of the 3D effect model in a specific simulation environment. The calling constraints include at least one or more of the following: resource consumption constraints, instance number constraints, viewpoint visibility constraints, level of detail constraints, lifecycle constraints, branch display constraints, and scheduling priority constraints.
[0084] Among them, resource usage constraints limit the number of particles, model faces, materials, texture resolution, and video memory or system memory usage allowed when a 3D effect model is invoked; instance quantity constraints limit the maximum number of effect instances allowed to exist for the same effect identifier at the same simulation moment; viewpoint visibility constraints limit whether effect instances need to be within the current view frustum, whether they need to reach a preset screen ratio, or whether they belong to a high-priority event; detail level constraints limit the invocation of high detail level, low detail level, or simplified effects under different viewpoint distances, different system loads, or different effect importance levels; lifecycle constraints limit the start conditions, duration, end conditions, and recycling conditions of effect instances; branch display constraints limit whether effect instances belong to the current active simulation branch or the simulation branch specified by the user to participate in the current comparison display; and scheduling priority constraints limit the rendering submission order when multiple effect instances simultaneously meet the invocation conditions.
[0085] The specific implementation process of the call constraint includes: the system first reads the call constraint field from the effect description file; then it obtains the current simulation time, current inference branch, current observation point, current system resource load, current instance queue status, and priority of the event to be simulated; then it compares the running status with the call constraint field; if the 3D effect model satisfies all necessary call constraints, the corresponding effect instance is allowed to be generated or rendered; if the 3D effect model does not satisfy the high level of detail call constraints but satisfies the low level of detail call constraints, the low level of detail resources are called or the effect resources are simplified; if the 3D effect model does not satisfy the minimum call constraints, the 3D effect model is delayed in loading, an existing instance is reused, or the 3D effect model is not called. Through the above process, those skilled in the art can reproduce the calling, degradation, reuse, and delayed loading process of the 3D effect model based on the call constraint field.
[0086] The 3D effect model also includes an index unit. The index unit constructs an event index, an effect index, a resource index, and a performance index based on the effect identifier field, effect category field, event matching rule field, rendering resource list field, resource type label field, performance level label field, and version identifier field. Specifically, the event index is constructed based on the event matching rule field and is used to retrieve potentially suitable 3D effect models when a simulation event occurs. The effect identifier index is constructed based on the effect identifier field and is used to directly access the specified 3D effect model. The resource index is constructed based on the rendering resource list field and resource type label field and is used for resource loading, resource reuse, and resource unloading. The performance index is constructed based on the performance level label field and is used to select high detail level, low detail level, or simplified effect under different load conditions.
[0087] The above fields have a corresponding relationship with the index, such as... Figure 2As shown, the event index comes from the event matching rules, the resource index comes from the rendering resource list field and the resource type label field, and the performance index comes from the performance level label field, which can avoid the problem of "the index basis is not reflected in the field".
[0088] Next, proceed to step S102.
[0089] In step S102, based on the event to be simulated, a suitable 3D effect model is matched and an effect candidate set is generated.
[0090] Specifically, generating the effect candidate set includes the following steps:
[0091] First, based on the simulation event parameters of the event to be simulated, at least one suitable 3D effect model is selected and matched through indexing units. The simulation event parameters include: event occurrence time, event type, event source object, event target object, event spatial location, event parameters, and the identifier of the simulation branch to which it belongs. For example, a fire strike event may include occurrence time, weapon object, target object, hit location, damage level, strike intensity, and the simulation branch to which it belongs; a target detection event may include detection equipment, the detected target, detection range, detection result, and target detection time; an electronic countermeasures event may include interference source, interference object, interference range, interference intensity, and duration.
[0092] Then, the event matching rule fields of the matched 3D effect models are compared with the simulation event parameters, and 3D effect models with the same rendering effect type are selected as the effect candidate set. It should be noted that a simulation event may correspond to one or more 3D effect models. For example, the same fire hit event may simultaneously correspond to explosion effects, smoke effects, debris scattering effects, target damage indicators, and target status change prompts; the same electronic interference event may simultaneously correspond to interference beams, interference areas, radiation source indicators, and link disruption prompts. The system combines these preliminary matching results into an effect candidate set.
[0093] It should be noted that the purpose of the effect candidate set is to store all 3D effect models that have the potential to be invoked with the current simulation event, and to serve as a basis for subsequent evaluation based on comprehensive fit. It serves as the basis for scoring, filtering, combining, downgrading, and merging effects. The effect candidate set avoids simply selecting the first matching effect and supports triggering multiple related visual effects for the same event.
[0094] Next, proceed to step S103.
[0095] In step S103, the candidate effect set is filtered based on necessary conditions to obtain the filtered three-dimensional effect model. The comprehensive fit between the three-dimensional effect model and the event to be simulated is calculated based on the event parameter matching degree, context matching degree, resource load adaptability and viewpoint visibility matching degree. At least one three-dimensional effect model is selected as the target effect model based on the comprehensive fit.
[0096] Specifically, such as Figure 3 As shown, when filtering the candidate effect set based on necessary conditions to obtain the filtered 3D effect model, the process includes:
[0097] After generating the effect candidate set, the system performs a pre-call verification on the 3D effect models in the effect candidate set. The pre-call verification is used to determine whether the candidate 3D effect models have the basic conditions for actual invocation. The pre-call verification is different from the candidate set generation process in step S102; step S102 is used to retrieve potentially suitable 3D effect models based on the event type and event matching rule fields of the event to be simulated, forming an effect candidate set; this step is used to eliminate candidate 3D effect models that do not have the basis for invocation based on the effect candidate set and necessary conditions.
[0098] The necessary conditions include consistency of event type, completeness of necessary parameters, whether parameter values are within the allowable range defined by the effect description file, and whether the effect category is suitable for the current specific simulation scenario. During the screening process, candidate 3D effect models must simultaneously meet the above necessary conditions; if the necessary parameters required by the candidate 3D effect model are not present in the event to be simulated, or the parameter values exceed the allowable range defined by the effect description file, or the effect category is not suitable for the current specific simulation scenario, then the candidate 3D effect model is eliminated. Through pre-call verification, the system ensures that all candidate 3D effect models entering the comprehensive fit calculation stage subsequently meet the basic calling conditions.
[0099] The overall fit This is used to represent the overall fit between the filtered 3D model and the simulated event in terms of event parameters, inference context, resource load, and viewpoint. The overall fit is... include:
[0100] ;
[0101] In the formula, For event parameter matching degree; For context matching degree; For resource load adaptability; Viewpoint visibility matching degree; , , and These represent the weighting coefficients for event parameter matching, context matching, resource load adaptability, and viewpoint visibility matching, respectively. , , and All are greater than 0, and In this embodiment, It is 0.4. , and Both are 0.2.
[0102] Among them, the event parameter matching degree This measure assesses the degree of consistency between the parameters of the simulated event and the event matching rule fields and adjustable parameter set fields in the effect description file. Event parameter matching degree. The scores can be calculated according to parameter type: For enumerated parameters, if the parameter value in the simulated event matches the parameter value specified in the effect description file, the corresponding parameter score is 1; otherwise, it is 0. For numerical parameters, if the parameter value in the simulated event is within the allowable range specified in the effect description file, the value is normalized based on its proximity to the recommended value or the center value of the range. For interval parameters, if the parameter interval in the simulated event overlaps with the interval specified in the effect description file, the value is assigned based on the overlap ratio. Parameters such as damage level, impact intensity, interference intensity, duration, and effective range can each obtain their corresponding parameter scores according to the above rules, and the event parameter matching degree is calculated. The result is obtained by weighting the scores of each parameter according to the preset weights.
[0103] Context matching score measures the degree of fit between the filtered 3D effect model and the current simulation stage, scene environment, day / night conditions, task type, and object type. Specifically, context matching score... Context matching is calculated based on the matching relationship between the current simulation stage, scene environment, day / night conditions, task type, and object type and the applicable context specified in the effect description file. If the current simulation stage, scene environment, day / night conditions, task type, or object type matches the corresponding field in the effect description file, the corresponding context item scores higher; if they do not match but fall within the compatibility range allowed by the effect description file, the corresponding context item scores the preset compatibility value; if they do not fall within the allowed range, the corresponding context item scores 0. Context matching degree The scores for each context item are calculated by weighting them according to preset weights. For example, in a nighttime scene, the system may prioritize explosion effects with obvious lighting effects; in a long-distance recap view, the system may prioritize cue effects with clear outlines and short durations.
[0104] Resource load adaptability measures whether the filtered 3D effect model is suitable for use under the current load. If the system load is low, high-detail effects can be used; if the system load is high, low-detail or simplified effects are preferred. Specifically, resource load adaptability... The resource load is calculated based on the estimated resource usage of the 3D effect model and the current system resource status. The estimated resource usage includes at least one or more of the following: particle count, model face count, material count, texture resolution, number of animations, number of line segments, or estimated video memory usage. The current system resource status includes at least one or more of the following: current frame rate, video memory usage, system memory usage, number of effect instances, and rendering quality strategy. When the current system resource status meets the resource conditions for calling high-detail effects, the resource load adaptability is... The value is relatively high; when the current system resource status only meets the conditions for low-level detail or simplified effect invocation, the resource load adaptability is high. Take the median value; when the current system resource status does not meet the minimum calling conditions of the current 3D rendering model, the resource load adaptability is adjusted. Take a lower value or 0.
[0105] Viewpoint visibility matching score measures the visibility and necessity of the filtered 3D effect model relative to the current viewpoint. A higher viewpoint visibility matching score indicates an effect occurring within the current field of view or being a high-priority event; conversely, an effect occurring far from the viewpoint and with lower priority may have its display detail reduced or be temporarily withheld. Specifically, viewpoint visibility matching score... The visibility matching degree is calculated based on the relationship between the location of the effect in the 3D effect model and the current viewing point. If the location of the effect is within the current viewing frustum and is close to the current viewing point, then the visibility matching degree is... The value is relatively high; if the effect occurs outside the current view center but is a high-priority event, then the viewpoint visibility matching degree is higher. Use the preset priority display value; if the effect occurs outside the current view frustum and is not a high-priority event, then the viewpoint visibility matching degree... Take a lower value or 0.
[0106] In this embodiment, the event parameter matching degree Context matching degree Resource load adaptability Matching degree with viewpoint visibility The values of are all in the range of 0 to 1.
[0107] It should be noted that the event parameter matching degree Values are assigned based on the degree of consistency between the event parameters and the event matching rule fields and adjustable parameter set fields in the effect description file; context matching degree. Assign a value based on the degree of matching between the current simulation stage, scene environment, day / night conditions, task type, object type, and the applicable context defined in the effect description file; resource load adaptability. The viewpoint visibility matching degree is assigned based on the degree of fit between the estimated resource usage of the 3D rendering model and the current system resource status. The value is assigned based on the visibility relationship, distance relationship, and event priority between the location where the effect occurs and the current viewing point.
[0108] The above four types of matching degree can be automatically calculated by the system according to preset rules, or the default weights and default assignment rules can be provided by the system configuration file, effect description file or simulation task configuration file.
[0109] When selecting at least one 3D effect model as the target effect model based on overall fit, the following are included:
[0110] When overall fit At this time, it allows the use of the currently filtered 3D effect model;
[0111] when At this time, it allows the use of a low-detail version or a simplified version of the currently filtered 3D model;
[0112] When overall fit At that time, the currently filtered 3D effect model will not be invoked.
[0113] It should be noted that the aforementioned comprehensive fit threshold can be configured according to the system operating environment. The system operating environment includes at least one or more of the following: hardware performance level, target frame rate, current rendering quality strategy, current number of effect instances, current video memory usage, and current simulation scene scale. The system can preset a first threshold and a second threshold in the configuration file, effect description file, or rendering quality strategy file; the first threshold is used to determine whether to call the full 3D effect model, and the second threshold is used to determine whether to call low-detail or simplified effects. By default, the first threshold can be set to 0.7, and the second threshold can be set to 0.5. When the system is running in a high-performance environment or has a large target frame rate margin, the first or second threshold can be lowered to increase the number of effects called; when the system is running in a low-performance environment or has a high system load, the first or second threshold can be increased to reduce the number of high-resource-consuming effects called. These thresholds can also be configured by the system administrator before the simulation task begins, according to specific task requirements.
[0114] Next, proceed to step S104.
[0115] In step S104, the simulation event parameters, deduction context and adjustable parameter set in the effect description file of the event to be simulated are bound together to generate parameter binding results. The parameter binding results are input into at least one target effect model to generate effect instances and construct an effect instance scheduling mechanism based on instance queue.
[0116] Specifically, after determining the target effect model, the event-effect matching parser binds the simulation event parameters, the inference context, and the adjustable parameter set in the effect description file to generate parameter binding results. For example, the display radius of an explosion effect can be determined by the impact intensity and damage level; the smoke duration can be determined by the damage level and wind field parameters; the link width can be determined by the link importance; the transparency of the interference area can be determined by the interference intensity; and the target detection range can be determined by the detection device type and detection status. The parameter binding results serve as input for subsequent effect instance creation, enabling the 3D effect model to dynamically adjust its display style according to different simulation events, rather than playing the same visual resource at a fixed time.
[0117] Specifically, the effect instance includes at least an effect identifier, resource reference, birth time, expected end time, associated simulation branch identifier, spatial transformation parameters, material parameters, playback progress, current display status, and parameter binding results. The birth time is determined by the occurrence time of the simulation event corresponding to the triggering effect instance. The expected end time is determined by the duration, end condition, or lifecycle linkage rule fields in the effect description file. For continuously displayed effect instances, the expected end time is determined by the corresponding simulation state release time, link disconnection time, target state change time, or user shutdown time. It should be noted that an active instance in the effect instance refers to an instance that has not yet ended at the current simulation time and belongs to the currently valid simulation branch or visible branch range. Specifically, an active instance should meet the following conditions: birth time is not later than the current simulation time, expected end time is later than the current simulation time, associated simulation branch is consistent with the currently active branch or is designated as a visible comparison branch by the user, and it has not been terminated by state rollback, branch filtering, or resource reclamation processes.
[0118] The inference branch refers to a subsequent inference path created based on the main inference link, historical snapshots, or historical states. The currently active inference branch refers to the inference branch that the system is currently executing, replaying, or displaying. The inference branch that the user specifies to participate in the current comparison display refers to one or more inference branches that the user selects to be displayed simultaneously with the currently active inference branch in multi-branch comparison mode. The inference branch that the user specifies to participate in the current comparison display is a display state of the inference branch and does not mean that all inference branches automatically participate in the comparison display.
[0119] The effect instance scheduling mechanism includes building an instance queue, snapshot saving, and state rollback. When building the instance queue, at least one corresponding effect instance is created based on the occurrence time of the current simulation event and written into the instance queue. The instance queue sorts the effect instances according to their birth time and expected end time. Specifically, the instance queue is sorted according to their birth time and expected end time, which makes it easier for the system to quickly determine which effect instances should be displayed, which effect instances should end, and which effect instances should be rolled back and cleared at any simulation moment.
[0120] When saving a snapshot, the current instance queue is traversed, and the complete state of each effect instance is written into the snapshot data. The complete state includes the effect identifier, the identifier of the deduction branch to which it belongs, the birth time, the expected end time, the spatial transformation parameters, the material parameters, the playback progress, the parameter binding result, and the current display status.
[0121] When performing a state rollback, terminate effect instances whose birth time is later than the target rollback time, clean up effect instances whose expected end time is no later than the target rollback time, select effect instances whose birth time is no later than the target rollback time and whose expected end time is later than the target rollback time from the instance queue, read and visualize the state of the corresponding effect instance from the snapshot save, and complete the state rollback based on the target rollback time.
[0122] Furthermore, the effect instance scheduling mechanism also includes branch deduction. When performing branch deduction, a deduction branch is created in the instance queue formed on the main deduction link based on historical snapshots or historical states. The deduction branch forms a new effect instance based on new instructions, parameters, action routes, target objects and / or deduction rules.
[0123] It should be noted that branch simulations are created when the simulation system resets instructions, parameters, action routes, target objects, or simulation rules from a historical snapshot or state, resulting in a subsequent simulation process that differs from the original simulation path. When no branch simulation is created, the system defaults to a main simulation chain, to which all effect instances belong. For example, if a user returns to a historical moment during a debriefing, adjusts the action route, changes the target, alters the jamming strategy, or modifies command instructions before continuing the simulation, a new branch simulation is formed.
[0124] When a new branch is created for simulation, all subsequent triggered effect instances are written to that branch identifier; effect instances already existing in the original simulation path retain their original branch identifiers unless the user explicitly chooses to merge or hide the branch. When the scheduler submits effect instances to the 3D rendering module, it filters them according to the currently active branch or the comparison branch specified by the user, ensuring that the visual effects of different simulation branches are not confused with each other.
[0125] Next, proceed to step S105.
[0126] In step S105, based on the effect instance scheduling mechanism, at least one effect instance is selected from the instance queue for visualization rendering, and lifecycle linkage is executed based on the rendering data of the effect instance.
[0127] Specifically, when selecting at least one effect instance for visualization rendering from the instance queue, the selected effect instance should simultaneously meet the following conditions:
[0128] Condition 1: The birth time of the effect instance is no later than the current simulation time, and the expected end time is later than the current simulation time.
[0129] Condition 2: The effect instance belongs to the current activity's projection branch, or belongs to the projection branch that the user specified to participate in the current comparison display;
[0130] Condition 3: The effect instance has completed resource loading, or has alternative low-level detail resources;
[0131] Condition 4: The effect instance is within the visible range of the current viewpoint, or it is not in the center of the current field of view but belongs to a high-priority event;
[0132] Condition 5: The effect instance has not been paused, rolled back, or marked as undisplayable by the resource reclamation process;
[0133] If any condition is not met, the effect instance will not enter the current visualization rendering submission process, unless the system selects its low-detail-level resource or simplified effect resource for replacement display according to the preset degradation replacement rules.
[0134] The selected effect instance, when being visualized and rendered, includes the following steps:
[0135] The rendering data includes the resource references, spatial transformation parameters, material parameters, playback progress parameters, and display layer parameters of the effect instance; among which:
[0136] The resource references are derived from the rendering resource list in the effect description file, and the loading results of the rendering resource list;
[0137] The spatial transformation parameters are used to determine the position, pose, scale, range of effect, motion path, or connection relationship of the effect instance in the 3D scene. These spatial transformation parameters are not obtained from a single piece of information, but are generated by combining one or more event parameters, object state parameters, and runtime state parameters according to the effect type.
[0138] For example, for effects such as point explosions, hit notifications, or status indicators, the spatial transformation parameters can be determined by the hit point location, the target object location, and the preset scaling ratio; for link construction effects, the spatial transformation parameters can be determined by the link start point object location, the link end point object location, the link height offset, and the link control point; for target detection effects, the spatial transformation parameters can be determined by the detection device location, detection direction, detection angle, and detection distance; for trajectory effects, the spatial transformation parameters can be determined by multiple trajectory points, trajectory line width, and trajectory display height; for continuously running effects, the spatial transformation parameters can also be updated based on changes in object posture, target movement status, or effect playback progress during the effect instance's operation.
[0139] The material parameters are derived from parameter binding results, inference context, damage level, interference intensity, link status, or lifecycle progress, and are used to control color, transparency, brightness, texture, line width, flicker frequency, or particle display style.
[0140] Among them, damage level is used to represent the degree of damage to the target object after the simulation event, which can be determined by the simulation logic calculation results, the parameters of the event to be simulated, or the user configuration rules; interference intensity is used to represent the strength of the effect of electronic interference, signal suppression, or communication disruption events, which can be determined by the parameters of the event to be simulated, the calculation results of the interference model, or the inference context; life cycle progress is used to represent the playback stage of the effect instance from the birth time to the current simulation time, which can be calculated based on the current simulation time, birth time, expected end time, and life cycle linkage rules.
[0141] For example, the higher the damage level, the higher the smoke density and flame brightness can be; the higher the interference intensity, the higher the transparency or flashing frequency of the interference area can be adjusted; the closer the life cycle progress is to the end stage, the higher the transparency, particle count, or brightness can be gradually reduced according to the life cycle linkage rules in the effect description file.
[0142] The playback progress parameter is calculated based on the difference between the current simulation time and the birth time of the effect instance, as well as the duration or lifecycle linkage rules in the effect description file. The display level parameter is determined based on the current viewpoint distance, the effect importance level, the system rendering quality strategy, and the current resource load status.
[0143] Among these parameters, the current viewpoint distance refers to the spatial distance between the current observation viewpoint or camera position and the location where the effect instance occurs; the effect importance level refers to the display priority set by the system for the effect instance based on the type of event to be simulated, event priority, importance of related objects, or user-configured rules; and the system rendering quality strategy refers to the rendering quality level pre-configured or dynamically adjusted by the system based on hardware performance, target frame rate, current resource load, and simulation task requirements. The system can determine whether to display the effect instance at a high detail level, a low detail level, or a simplified effect based on the above parameters.
[0144] Lifecycle linkage is performed based on the rendered data. Lifecycle linkage includes physical approximation linkage rules and logical state linkage rules, wherein:
[0145] The physical approximation linkage rule is used to generate a one-time pulse displacement on the target object within the effect range when an effect instance such as an explosion, impact, debris dispersion, or blast wave diffusion is activated. This displacement is based on the effect center, radius of effect, effect intensity, and attenuation relationship. Here, "impact force" does not refer to altering the simulation conclusion using actual physical calculations, but rather to an approximate effect set up for 3D visualization and status indication. This effect is subject to preset constraint rules, including maximum radius of effect, maximum disturbance amplitude, attenuation function, type of target object, and number of applications.
[0146] The logical state linkage rules are used to send state update messages to the simulation logic module when the effect instance starts, reaches a key playback progress, or ends playback, so as to change the visible state, damage state, link state, or task state of the target object. For example, after the target damage effect ends playback, the simulation logic module can be notified to switch the target display state to "failed" or "destroyed"; after the link interruption effect starts, the display control module can be notified to display the corresponding link as interrupted.
[0147] Furthermore, the aforementioned lifecycle linkage rules are preset rules or interface constraints within the system and are configured through effect description files. Their function is to achieve controlled linkage between visual performance and simulation logic, avoiding a disconnect between the special effects playback process and system state management.
[0148] In some embodiments, the method further includes a resource reuse control unit. The resource reuse control unit maintains an instance reuse pool for each effect identifier. After the effect instance finishes playing, it is not immediately destroyed, but a reset process is executed and it returns to the instance reuse pool. The reset process includes:
[0149] Stop the playback of particle, animation, line segment, or material gradients;
[0150] Clear event bindings;
[0151] Clear the parameter binding result;
[0152] Restore default material and default transparency;
[0153] Reset spatial position, rotation, scaling, and hierarchy; clear lifecycle linkage markers;
[0154] Clear the branch identifier; set the display status to invisible;
[0155] Additionally, it resets the playback progress to zero and marks the instance status as idle.
[0156] After the above reset is completed, the effect instance can be reactivated the next time the same effect identifier is invoked, thereby reducing memory allocation and performance fluctuations caused by frequent creation and destruction.
[0157] Furthermore, this method also includes a resource management module, which monitors the usage of rendering resources. When a rendering resource is not reused within a preset idle time and its video memory or system memory usage reaches a preset high usage threshold, the resource management module unloads the rendering resource without affecting the current rendering frame, while retaining its effect description file and index information.
[0158] Both the preset idle time and the preset high usage threshold are configurable parameters. In one implementation, the preset idle time is 300 seconds; the high usage threshold is defined as a single rendering resource consuming no less than 256MB of video memory, or the cumulative video memory consumption of similar resources consuming no less than 512MB. These thresholds can be adjusted through the system configuration file depending on the system operating environment or the model size.
[0159] The rendering resources here include models, particles, materials, animations, trajectory lines, icons, and annotations recorded in the rendering resource list in the effect description file. The rendering resources are registered in step S101 and loaded, submitted, reused, or unloaded in step S105, forming a complete resource usage loop.
[0160] In the above process, the instance reuse pool is used to solve the problem of repeatedly using instances of the same effect, while asynchronous resource unloading is used to solve the problem of releasing rendering resources that have been idle for a long time and have high resource consumption. The two work together to manage resources, but they deal with different objects. The instance reuse pool mainly manages the runtime state of effect instances, while asynchronous resource unloading mainly manages rendering resources such as models, particles, materials, animations, trajectory lines, icons, and annotations.
[0161] The second embodiment of the present invention also provides a system for constructing a three-dimensional effect model library, comprising:
[0162] The initialization unit is configured to build a 3D effect model based on 3D special effects assets and effect description files, using call constraints;
[0163] The preprocessing unit is configured to match and adapt the 3D effect model based on the event to be simulated and generate a set of effect candidates;
[0164] The selection unit is configured to filter the candidate effect set based on necessary conditions to obtain a filtered three-dimensional effect model, calculate the comprehensive fit between the three-dimensional effect model and the event to be simulated based on event parameter matching degree, context matching degree, resource load adaptability and viewpoint visibility matching degree, and select at least one three-dimensional effect model as the target effect model based on the comprehensive fit degree.
[0165] The scheduling unit is configured to bind the simulation event parameters, inference context and adjustable parameter set in the effect description file of the event to be simulated, generate parameter binding results, input the parameter binding results into at least one target effect model, generate effect instances, and construct an effect instance scheduling mechanism based on instance queues.
[0166] The rendering unit is configured to select at least one effect instance in the instance queue for visualization rendering based on the effect instance scheduling mechanism, and to perform lifecycle linkage based on the rendering data of the effect instance.
[0167] The third embodiment of the present invention also provides an electronic device, the electronic device comprising:
[0168] At least one processor; and,
[0169] The memory is communicatively connected to the at least one processor; wherein,
[0170] The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method of constructing a three-dimensional effect model library according to any of the foregoing embodiments.
[0171] The fourth embodiment of the present invention also provides a non-transitory computer-readable storage medium storing computer instructions for causing the computer to execute the method for constructing a three-dimensional effect model library as described in any of the foregoing embodiments.
[0172] The fifth embodiment of the present invention also provides a computer program product, which includes a computing program stored on a non-transitory computer-readable storage medium. The computer program includes program instructions that, when executed by a computer, cause the computer to perform the method of constructing a three-dimensional effect model library of any of the foregoing embodiments.
[0173] Figure 4The illustration shows a method or device 1000 implementing an embodiment of the present invention. In some embodiments, more or fewer devices may be included than illustrated. In some embodiments, it may be implemented using a single or multiple devices. In some embodiments, it may be implemented using cloud-based or distributed devices.
[0174] like Figure 4 As shown, device 1000 includes a processor 1001 for performing various appropriate operations and processes based on programs and / or data stored in read-only memory (ROM) 1002 or programs and / or data loaded from storage portion 1008 into random access memory (RAM) 1003. Processor 1001 may be a multi-core processor or may contain multiple processors. In some embodiments, processor 1001 may include a general-purpose main processor and one or more special coprocessors, such as a central processing unit (CPU), graphics processing unit (GPU), neural network processor (NPU), digital signal processor (DSP), etc. Various programs and data required for the operation of device 1000 are also stored in RAM 1003. Processor 1001, ROM 1002, and RAM 1003 are interconnected via bus 1004. Input / output (I / O) interface 1005 is also connected to bus 1004.
[0175] The processor and memory described above are used together to execute programs stored in the memory. When the program is executed by a computer, it can implement the methods, steps, or functions described in the above embodiments.
[0176] The following components are connected to I / O interface 1005: an input section 1006 including a keyboard, mouse, touchscreen, etc.; an output section 1007 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 1008 including a hard disk, etc.; and a communication section 1009 including a network interface card such as a LAN card, modem, etc. The communication section 1009 performs communication processing via a network such as the Internet. A drive 1010 is also connected to I / O interface 1005 as needed. A removable medium 1011, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on drive 1010 as needed so that computer programs read from it can be installed into storage section 1008 as needed. Figure 4 The diagram only shows a portion of the components and does not imply that the device 1000 only includes... Figure 4 The components shown.
[0177] The systems, devices, modules, or units described in the above embodiments can be implemented by a computer or its associated components. The computer may be, for example, a mobile terminal, smartphone, personal computer, laptop computer, in-vehicle human-machine interface device, personal digital assistant, media player, navigation device, game console, tablet computer, wearable device, smart TV, Internet of Things system, smart home, industrial computer, server, or a combination thereof.
[0178] Although not shown, in this embodiment of the invention, a computer-readable storage medium is provided having a computer program / instruction stored thereon, which, when executed by a processor, implements the method for constructing a three-dimensional effect model library as described in the embodiment.
[0179] Storage media in embodiments of the present invention include articles that are permanent and non-permanent, removable and non-removable, capable of storing information by any method or technology. Examples of storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transfer medium that can be used to store information accessible by a computing device.
[0180] Although not shown, embodiments of the present invention also provide a computer program product, including: a computer program / instructions that, when executed by a processor, implement the method for constructing a three-dimensional effect model library as described in the embodiments.
[0181] The methods, programs, systems, apparatuses, etc., in embodiments of the present invention can be executed or implemented in one or more networked computers, or practiced in a distributed computing environment. In the embodiments of this specification, in these distributed computing environments, tasks can be performed by remote processing devices connected via a communication network.
Claims
1. A method for constructing a 3D effect model library, characterized in that, Includes the following steps: Step S1: Based on the 3D special effects assets and effect description files, construct a 3D effect model using call constraints; Step S2: Based on the event to be simulated, match the appropriate 3D effect model and generate an effect candidate set; Step S3: Filter the candidate effect set based on necessary conditions to obtain the filtered three-dimensional effect model. Calculate the comprehensive fit between the three-dimensional effect model and the event to be simulated based on event parameter matching degree, context matching degree, resource load adaptability, and viewpoint visibility matching degree. Select at least one three-dimensional effect model as the target effect model based on the comprehensive fit. Step S4: Bind the simulation event parameters, inference context and adjustable parameter set in the effect description file of the event to be simulated, generate parameter binding results, input the parameter binding results into at least one target effect model, generate effect instances, and build an effect instance scheduling mechanism based on instance queue; Step S5: Based on the effect instance scheduling mechanism, select at least one effect instance in the instance queue for visualization rendering, and perform lifecycle linkage based on the rendering data of the effect instance.
2. The method for constructing a 3D effect model library according to claim 1, characterized in that, The 3D special effects assets are visual resources loaded and displayed by the 3D rendering module, including one or more of the following: 3D models, particle effects, materials, animations, trajectory lines, icons, annotations, and sound cues; The effect description file is used to provide event semantics, invocation rules, and lifecycle rules for 3D special effects assets, and includes at least: an effect identifier field, an effect category field, an event matching rule field, a rendering resource list field, an adjustable parameter set field, a lifecycle linkage rule field, a resource type tag field, a performance level tag field, and a version identifier field. Specifically: the effect identifier field uniquely identifies the 3D effect model; the effect category field describes the effect category of the 3D effect model, including link building, target detection, electronic warfare, firepower strike, damage effects, and entity maneuvering; the event matching rule field defines the simulation event types, simulation event parameters, and the range of simulation event parameters that the 3D effect model adapts to; and the rendering resource list field... The single field is used to record 3D special effects assets at different levels of detail. The adjustable parameter set field is used to declare parameters that can be overridden by simulation events or inference context when called. The lifecycle linkage rule field is used to record the interaction rules between the effect instance and the simulation logic, physical approximation calculation and state management during the startup, running, ending or recycling phases. The resource type label field is used to identify the resource types involved in the 3D effect model. Resource types include particle resources, model resources, line segment resources, material resources and animation resources. The performance level label field is used to describe the resource consumption, recommended display distance and applicable load status of the 3D effect model at different levels of detail. The version identifier field is used to describe the version information of the effect description file and associated rendering resources. The calling constraints are used to describe the resource consumption, visibility, level of detail, and scheduling limitations of the 3D effect model in a specific simulation environment; The 3D effect model also includes an index unit. The index unit constructs an event index, an effect index, a resource index, and a performance index based on the effect identifier field, effect category field, event matching rule field, rendering resource list field, resource type label field, performance level label field, and version identifier field. Specifically, the event index is constructed based on the event matching rule field and is used to retrieve potentially suitable 3D effect models when a simulation event occurs. The effect identifier index is constructed based on the effect identifier field and is used to directly access the specified 3D effect model. The resource index is constructed based on the rendering resource list field and resource type label field and is used for resource loading, resource reuse, and resource unloading. The performance index is constructed based on the performance level label field and is used to select high detail level, low detail level, or simplified effect under different load conditions.
3. The method for constructing a three-dimensional effect model library according to claim 2, characterized in that, The process of generating an effect candidate set includes the following steps: Based on the simulation event parameters of the event to be simulated, at least one suitable 3D effect model is selected through the index unit. The simulation event parameters include: event occurrence time, event type, event source object, event target object, event spatial location, event parameters, and the identifier of the simulation branch to which it belongs. The event matching rule field of the matched 3D effect model is compared with the simulation event parameters, and 3D effect models with the same rendering effect type are selected as the effect candidate set.
4. The method for constructing a three-dimensional effect model library according to claim 1, characterized in that, When filtering the candidate effect set based on necessary conditions to obtain the filtered 3D effect model, the following steps are included: The three-dimensional effect models in the effect candidate set are verified before being called. The verification selects candidate three-dimensional effect models that have the basis for being called based on necessary conditions, and is used to determine whether the candidate three-dimensional effect models have the basic conditions for being actually called. The necessary conditions include event type consistency, necessary parameter completeness, parameter values, and effect category. During the screening process, 3D effect models with event type consistency, necessary parameter completeness, and parameter values within the allowable range defined by the effect description file, and whose effect category is adapted to the current specific simulation scene, are selected as the filtered 3D effect models. The overall fit This is used to represent the overall fit between the filtered 3D model and the simulated event in terms of event parameters, inference context, resource load, and viewpoint. The overall fit is... include: ; In the formula, For event parameter matching degree; For context matching degree; For resource load adaptability; Viewpoint visibility matching degree; , , and These represent the weighting coefficients for event parameter matching, context matching, resource load adaptability, and viewpoint visibility matching, respectively. , , and All are greater than 0, and ; When selecting at least one 3D effect model as the target effect model based on overall fit, the following are included: When overall fit At this time, it allows the use of the currently filtered 3D effect model; when At this time, it allows the use of a low-detail version or a simplified version of the currently filtered 3D model; When overall fit At that time, the currently filtered 3D effect model will not be invoked.
5. The method for constructing a three-dimensional effect model library according to claim 1, characterized in that, The effect instance includes at least an effect identifier, resource reference, birth time, expected end time, corresponding simulation branch identifier, spatial transformation parameters, material parameters, playback progress, current display status, and parameter binding results. The birth time is determined by the occurrence time of the simulation event corresponding to the trigger effect instance. The expected end time is determined by the duration, end condition, or lifecycle linkage rule fields in the effect description file. For continuous display effect instances, the expected end time is determined by the corresponding simulation state release time, link disconnection time, target state change time, or user shutdown time. The effect instance scheduling mechanism includes building an instance queue, snapshot saving, and state rollback. When building the instance queue, at least one corresponding effect instance is created according to the occurrence time of the current event to be simulated and written into the instance queue. The instance queue sorts the effect instances according to their birth time and expected end time. When saving a snapshot, the current instance queue is traversed, and the complete state of each effect instance is written into the snapshot data. The complete state includes the effect identifier, the identifier of the deduction branch to which it belongs, the birth time, the expected end time, the spatial transformation parameters, the material parameters, the playback progress, the parameter binding result, and the current display status. When performing a state rollback, terminate effect instances whose birth time is later than the target rollback time, clean up effect instances whose expected end time is no later than the target rollback time, select effect instances whose birth time is no later than the target rollback time and whose expected end time is later than the target rollback time from the instance queue, read and visualize the state of the corresponding effect instance from the snapshot save, and complete the state rollback based on the target rollback time.
6. The method for constructing a three-dimensional effect model library according to claim 5, characterized in that, The effect instance scheduling mechanism also includes branch deduction. When performing branch deduction, a deduction branch is created in the instance queue formed on the main deduction link based on historical snapshots or historical states. The deduction branch forms a new effect instance based on new instructions, parameters, action routes, target objects and / or deduction rules.
7. The method for constructing a three-dimensional effect model library according to claim 6, characterized in that, When selecting at least one effect instance for visualization rendering from the instance queue, the selected effect instance should simultaneously meet the following conditions: Condition 1: The birth time of the effect instance is no later than the current simulation time, and the expected end time is later than the current simulation time. Condition 2: The effect instance belongs to the current activity's projection branch, or belongs to the projection branch that the user specified to participate in the current comparison display; Condition 3: The effect instance has completed resource loading, or has alternative low-level detail resources; Condition 4: The effect instance is within the visible range of the current viewpoint, or it is not in the center of the current field of view but belongs to a high-priority event; Condition 5: The effect instance has not been paused, rolled back, or marked as undisplayable by the resource reclamation process; The selected effect instance, when being visualized and rendered, includes the following steps: The rendering data includes the resource references, spatial transformation parameters, material parameters, playback progress parameters, and display layer parameters of the effect instance; among which: The resource references are derived from the rendering resource list in the effect description file, and the loading results of the rendering resource list; The spatial transformation parameters are used to determine the position, pose, scaling, range of action, motion path or connection relationship of the effect instance in the 3D scene. The spatial transformation parameters are generated by combining one or more event parameters, object state parameters and runtime state parameters according to the effect type. The material parameters are derived from parameter binding results, inference context, damage level, interference intensity, link status, or lifecycle progress, and are used to control color, transparency, brightness, texture, line width, flicker frequency, or particle display style. The playback progress parameter is derived from the difference between the current simulation time and the birth time of the effect instance; the display level parameter is determined based on the current viewpoint distance, the importance level of the effect, the system rendering quality strategy, and the current resource load status. Based on the rendered data, lifecycle linkage is executed. Lifecycle linkage includes physical approximation linkage rules and logical state linkage rules. The physical approximation linkage rules are used to generate a one-time pulse displacement of the target object within the effect range according to the effect center, radius of action, effect intensity, and attenuation relationship when an effect instance such as explosion, impact, debris scattering, or blast wave diffusion is started. The logical state linkage rules are used to send a state update message to the simulation logic module to change the visible state, damage state, link state, or task state of the target object when the effect instance is started, reaches a key playback progress, or ends playback.
8. A system for constructing a library of 3D effect models, characterized in that, The method for constructing a 3D effect model library according to any one of claims 1-7 includes: The initialization unit is configured to build a 3D effect model based on 3D special effects assets and effect description files, using call constraints; The preprocessing unit is configured to match and adapt the 3D effect model based on the event to be simulated and generate a set of effect candidates; The selection unit is configured to filter the candidate effect set based on necessary conditions to obtain a filtered three-dimensional effect model, calculate the comprehensive fit between the three-dimensional effect model and the event to be simulated based on event parameter matching degree, context matching degree, resource load adaptability and viewpoint visibility matching degree, and select at least one three-dimensional effect model as the target effect model based on the comprehensive fit degree. The scheduling unit is configured to bind the simulation event parameters, inference context and adjustable parameter set in the effect description file of the event to be simulated, generate parameter binding results, input the parameter binding results into at least one target effect model, generate effect instances, and construct an effect instance scheduling mechanism based on instance queues. The rendering unit is configured to select at least one effect instance in the instance queue for visualization rendering based on the effect instance scheduling mechanism, and to perform lifecycle linkage based on the rendering data of the effect instance.
9. An electronic device, characterized in that, The electronic device includes: At least one processor; and, The memory is communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method for constructing a three-dimensional effect model library as described in any one of claims 1 to 7.
10. A non-transitory computer-readable storage medium, characterized in that, The non-transitory computer-readable storage medium stores computer instructions for causing the computer to perform the method of constructing a three-dimensional effect model library as described in any one of claims 1 to 7.