Weapon equipment damage simulation method, equipment, medium and product
By refining the collision detection of weapons and equipment to the functional component level, combining physical attributes and hit effect spanning tree, the accuracy of hit detection is solved, and high-precision damage simulation at the component level of weapons and equipment is realized, improving the credibility of virtual battlefield training and experiments.
Patent Information
- Application Number
- CN202510332908.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-20
- Publication Date
- 2025-07-18
AI Technical Summary
The existing collision detection technology cannot meet the accuracy requirements of weapon and equipment hit detection, and cannot reflect the damage effect of different ammunition hits different parts, affecting the credibility of virtual battlefield training and combat experiments.
By creating attribute collision encirclement and equivalent geometry of weapons and equipment, combining hierarchical binding and physical attributes, detailed collision detection and hit detection are carried out to generate local damage effects and overall functional failure effects, and using hit effect spanning tree to achieve linkage simulation of local details and overall performance.
It realizes high-precision damage simulation at the component level of weapons and equipment, improves the authenticity and credibility of hit detection, supports the invasion simulation of complex multi-layer structures, and enhances the credibility of virtual battlefield training and experiments.
Smart Images

Figure CN120337318A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of weapon and equipment collision detection, and particularly to a method, device, medium and product for simulating weapon and equipment damage. Background Art
[0002] In a virtual battlefield scenario, all interactions are based on collision detection, and the accuracy of collision detection affects the accuracy of interaction results. In modern warfare, firepower strikes are still the main means to achieve combat objectives. Therefore, accurate hit detection in a virtual battlefield scenario is a key link to ensure the accuracy of the confrontation results between the two warring parties and an important part of realism control.
[0003] Collision detection is a relatively mature technology in the field of computer graphics and can better achieve the completeness and timeliness of hit detection in a three-dimensional virtual scene. However, this general technology does not consider complex collision effect calculations. Collision detection only provides limited information such as the coordinates of the collision point, the collision surface, and the colliding object, and cannot meet the accuracy requirements of hit detection. Summary of the Invention
[0004] The purpose of the present application is to provide a method, device, medium and product for simulating weapon and equipment damage, which can more realistically simulate the damage effects of different components of weapon and equipment and improve the authenticity and accuracy of hit detection.
[0005] To achieve the above object, the present application provides the following solutions:
[0006] In a first aspect, the present application provides a method for simulating weapon and equipment damage, including:
[0007] For each armed device, create an attribute collision bounding volume for the externally visible functional components of the armed device and create an attribute equivalent geometric body for the internally invisible functional components of the armed device, where the attribute collision bounding volume is a collision bounding volume with physical attributes and having a hierarchical relationship with the geometric model of the weapon and equipment, and the equivalent geometric body is an equivalent geometric body with physical attributes and having a hierarchical relationship with the geometric model of the weapon and equipment;
[0008] Perform collision detection on all attribute collision bounding volumes to determine a set of collision pairs, where the set of collision pairs includes several collision pairs, and each collision pair includes one of the attribute collision bounding volumes and the corresponding colliding body;
[0009] Judge whether there is a target collision pair in the set of collision pairs to obtain a first judgment result, where the target collision pair is a collision pair whose colliding body type is a projectile;
[0010] If the first judgment result is yes, trigger hit detection processing;
[0011] In the hit detection process, based on the collision point and collision direction of the target collision pair, it is determined whether the projectile penetrates the collision objects in the collision detection group to obtain a second judgment result, and the hit component is determined according to the second judgment result, where the collision objects are all attribute collision bounding volumes and attribute equivalent geometric bodies below the target attribute collision bounding volume level, and the target attribute collision bounding volume is the attribute collision bounding volume in the target collision pair;
[0012] For each of the hit components, local damage effects and overall functional failure effects are generated through a predefined hit effect generation tree.
[0013] In a second aspect, the present application provides a computer device, including: a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor executes the computer program to implement the weapon equipment damage simulation method provided in the first aspect above.
[0014] In a third aspect, the present application provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the weapon equipment damage simulation method provided in the first aspect above.
[0015] In a fourth aspect, the present application provides a computer program product, including a computer program, and when the computer program is executed by a processor, it implements the weapon equipment damage simulation method provided in the first aspect above.
[0016] According to the specific embodiments provided by the present application, the present application has the following technical effects:
[0017] The present application provides a weapon equipment damage simulation method, device, medium, and product. The method includes creating and hierarchically binding independent collision models (collision bounding volumes and equivalent geometric bodies) of weapon equipment functional components, integrating physical attributes in the independent collision models, thereby performing collision detection and hit detection, and generating local damage effects and overall functional failure effects through a predefined hit effect generation tree. By refining collision detection to the functional component level, the present application supports differential simulation of internal damage effects, integrates physical attributes into the simulation logic, and improves simulation authenticity; supports penetration simulation of complex multi-layer structures, and improves the credibility of virtual battlefield training and experiments; dynamically generates damage effects through a tree structure, and realizes the linkage simulation of local details and overall performance. Therefore, the present application realizes high-precision damage simulation at the component level of weapon equipment. Description of the Drawings
[0018] To more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for use in the embodiments. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0019] Figure 1 It is a schematic flow chart of a weapon equipment damage simulation method provided in Embodiment 1 of the present application;
[0020] Figure 2 In Embodiment 1 of the present application Figure 1 It is a schematic diagram of the physical collision model of the weapon equipment;
[0021] Figure 3 It is a schematic diagram of the calculation of the equivalent thickness in Embodiment 1 of the present application;
[0022] Figure 4 It is a schematic diagram of the effect definition in Embodiment 1 of the present application;
[0023] Figure 5 It is a schematic diagram of the structure of a computer device provided in Embodiment 2 of the present application. Specific Embodiments
[0024] The following will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some embodiments of the present application, rather than all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present application.
[0025] To make the above objects, features, and advantages of the present application more obvious and understandable, the present application will be further described in detail below with reference to the drawings and specific embodiments.
[0026] Embodiment 1
[0027] Considering that the existing collision detection technology cannot meet the accuracy requirements of hit detection. For example, when a shell hits a tank, the current hit detection method can only obtain the hit point coordinates and the hit geometry. Since the 3D model of the tank is only a simple shell-shaped geometry describing the external shape of the tank and cannot provide detailed internal structure information like a CAD model, it cannot reflect the differences in damage effects when different ammunitions hit different parts of the tank model, especially the damage effects inside the vehicle body, which seriously affects the credibility of the results of simulation confrontation training and combat experiments.
[0028] In this regard, the embodiments of the present application provide a method for simulating the damage of weapons and equipment, including the following steps 101 to 106. Among them
[0029] Step 101: For each armed device, create an attribute collision bounding volume for the externally visible functional components of the armed device, and create an attribute equivalent geometric body for the internally invisible functional components of the armed device. Wherein, the attribute collision bounding volume is a collision bounding volume with physical attributes and having a hierarchical relationship with the geometric model of the weapon and equipment, and the equivalent geometric body is an equivalent geometric body with physical attributes and having a hierarchical relationship with the geometric model of the weapon and equipment.
[0030] Step 101 specifically includes:[[]]
[0031] Step 101-1: For each armed device, separate the geometric model of the armed device from the physical collision model to obtain the separated physical collision model;
[0032] Step 101-2: Create a collision bounding volume for each externally visible functional component in the separated physical collision model, and create an equivalent geometric body for each internally invisible functional component;
[0033] Step 101-3: Bind all the collision bounding volumes and the equivalent geometric bodies to the geometric model and establish a hierarchical relationship to obtain the bound collision bounding volumes and the bound equivalent geometric bodies;
[0034] Step 101-4: Add physical attributes to the bound collision bounding volumes and the bound equivalent geometric bodies respectively to correspondingly obtain the attribute collision bounding volumes and the equivalent geometric bodies. Wherein, the physical attributes include material type, function type, and performance weight.
[0035] Step 102: Perform collision detection on all the attribute collision bounding volumes to determine a set of collision pairs. Wherein, the set of collision pairs includes several collision pairs, and each collision pair includes one of the attribute collision bounding volumes and the corresponding collision body.
[0036] In this embodiment, the hierarchical bounding box method is used to perform collision detection on all the attribute collision bounding volumes.
[0037] Step 103: Determine whether there is a target collision pair in the set of collision pairs to obtain a first judgment result. Wherein, the target collision pair is a collision pair whose collision body type is a projectile ammunition.
[0038] Step 104: If the first judgment result is yes, trigger the hit detection process.
[0039] Step 105. In the hit detection process, based on the collision point and collision direction of the target collision pair, determine whether the projectile penetrates the collision objects in the collision detection group of the ammunition collision body to obtain a second judgment result, and determine the hit component according to the second judgment result. Herein, the collision objects are all the attribute collision bounding volumes and attribute equivalent geometric bodies below the target attribute collision bounding volume level, and the target attribute collision bounding volume is the attribute collision bounding volume in the target collision pair.
[0040] Step 105 specifically includes:
[0041] Step 105-1: Determine the collision detection group of the ammunition collision body according to the geometric model of the target attribute collision bounding volume and the geometric model of the ammunition collision body in the target collision pair;
[0042] Step 105-2: Use the collision point of the target collision pair as the first origin, emit a first ray along the collision direction of the target collision pair, perform ray detection on the collision detection group, and obtain the first collision object on the penetration path of the ammunition collision body;
[0043] Step 105-3: Calculate the equivalent thickness of the first collision object according to the material protection coefficient and the actual thickness;
[0044] Step 105-3 specifically includes:
[0045] Step 105-3-1: Perform ray detection on the first collision object according to the first origin and the first ray to obtain the first collision point;
[0046] Step 105-3-2: Perform ray detection on the first collision object according to the second origin and the second ray to obtain the second collision point. Herein, the second origin is any point on the extension line of the first line segment, the first line segment is determined according to the first origin and the first collision point, and the second ray is a ray emitted in the opposite direction of the collision direction of the target collision pair;
[0047] Step 105-3-3: Calculate the actual distance according to the coordinates of the first collision point and the coordinates of the second collision point;
[0048] Step 105-3-4: Calculate the equivalent thickness of the first collision object according to the material protection coefficient and the actual thickness. Herein, the material protection coefficient is a variable determined according to the material type of the first collision object.
[0049] Step 105-4: Determine whether the projectile penetrates the collision objects in the collision detection group according to the equivalent thickness and the preset penetration distance to obtain a second judgment result;
[0050] Step 105-5: If the second judgment result is yes, mark the functional component corresponding to the first collision object as hit, mark the hit type as penetration, remove the first collision object from the collision detection group, use the collision detection group after the removal operation as the new collision detection group, and return to Step 105-2;
[0051] Step 105-6: If the second judgment result is no, mark the functional component corresponding to the first collision object as hit, mark the hit type as collision, and stop the hit detection process.
[0052] Step 106: For each of the hit components, generate local damage effects and overall functional failure effects through a predefined hit effect generation tree.
[0053] Step 106 specifically includes:
[0054] Step 106-1: For each of the hit components, search for effect definitions in the local effect nodes of the predefined hit effect generation tree to generate local damage effects, where the local effect nodes are used to define the effects of specific functional component damage;
[0055] Step 106-2: Calculate the cumulative functional performance failure rate according to the functional type and performance weight of the hit component;
[0056] Step 106-3: Search for effect definitions in the overall effect nodes of the predefined hit effect generation tree according to the cumulative functional performance failure rate to generate overall functional failure effects, where the overall effect nodes are used to define the total damage effects of a class of functional components with the same functional type.
[0057] In this embodiment, the collision detection is refined to the functional component level, supporting the differential simulation of internal damage effects; through material type, functional type, and performance weight, materials science and damage dynamics are integrated into the simulation logic; through a tree structure, damage effects are dynamically generated to achieve the linkage simulation of local details and overall performance, overcoming the defect that traditional collision detection only focuses on geometric collision and cannot meet the accuracy requirements of hit detection, solving the problem of invisibility of internal components. This embodiment adds functional attributes and damage logic, simplifies the model complexity through equivalent geometric bodies and hierarchical binding, balances efficiency and accuracy, and improves the authenticity and accuracy of the simulation.
[0058] The weapon equipment damage simulation method of this embodiment can achieve:
[0059] High-precision damage simulation: It can distinguish the effects of different ammunition hitting components such as the tank engine and fuel tank (such as catching fire, explosion, and loss of mobility).
[0060] Credibility Enhancement: Quantify the impact of damage on combat capabilities through the material protection coefficient and performance weights, and enhance the reference value of training and experimental results.
[0061] Real-time Performance and Scalability: The combination of hierarchical bounding boxes and ray detection ensures efficient calculation; the hit effect generation tree supports flexible expansion of new damage types.
[0062] Tactical Optimization Support: Provide highly credible simulation data for weapon effectiveness evaluation and tactical decision-making, and promote the intelligent development of military training and equipment design.
[0063] To make the above process of this embodiment clearer to those skilled in the art, the following is specifically explained in conjunction with Figure 2 - Figure 3 for specific illustration.
[0064] 1. Construct Collision Agents
[0065] Separate the geometric appearance model and physical collision model of the weapon and equipment, and realize the component-level description of the physical collision model, providing conditions for efficient and accurate hit detection.
[0066] (1) Create collision bounding volumes in units of the functional components of the geometric appearance model of the weapon and equipment. The so-called functional components refer to the actual components represented by the model that have a certain function, and when the component is damaged, it will cause the loss of function or the decline of corresponding performance. For example, the driving wheels, road wheels, tracks, engines, and transmission cases of a tank model all belong to the motion functional components; for the functional components inside the model, such as the personnel, communication equipment, and weapons inside the tank turret, these components are invisible to the personnel outside the vehicle. To simplify the model, only their equivalent geometric bodies need to be established. The so-called equivalent geometric body refers to a geometric body that can reflect the basic shape and position of the description object, as Figure 2 shown. All the created collision bounding volumes and equivalent geometric bodies are bound to the corresponding geometric models to establish a hierarchical relationship, ensuring a correct forward motion relationship with the geometric models.
[0067] (2) Physical properties of the defined collision bounding volumes and equivalent geometric bodies. The collision bounding volumes are used for all collision detections, including collisions with terrain, obstacles, and projectiles; the equivalent geometric bodies are only used for hit detections with projectiles. Add material type, function type, and performance weight to each collision bounding volume and equivalent geometric body respectively. The protective property against penetration is reflected by the material type, such as homogeneous steel, wood, plastic, composite armor, etc.; the function type is used to describe the function of the component for the entire model, such as movement, communication, artillery, machine gun, etc. For special components such as fuel tanks and ammunition compartments, since secondary effects will occur when they are hit, causing damage to other functional components, their function type is set to global. The performance weight is used to describe the impact of the destruction of the component on the corresponding function, and the value range is [0, 1]. For example, the damage of the engine will cause the loss of the maneuverability of the tank, and its performance weight is 1. The damage of the road wheel only affects the passability of the tank, and its performance weight can be set to a relatively small value.
[0068] 2. Physical Collision Detection
[0069] Detect all hit events of weapons and ammunition that occur in the virtual battlefield scene.
[0070] (1) Use the classic hierarchical bounding box collision detection method to perform collision detection on all collision bounding volumes in the scene, and obtain the set of collided mesh pairs (i.e., the collision pair set) F = {C1, C2,... C n}, and the element C i of the set includes a pair of collision bounding volumes, denoted as (A i , B i ), the collision point P i where a collision occurs between the collision bounding volume A i (the collision bounding volume of collision bodies such as terrain, obstacles, and projectiles) and B i (i.e., the attribute collision bounding volume), and the collision direction is
[0071] (2) Determine whether there is a collision bounding volume of a projectile in F. If it exists, it means that a hit event has occurred, and perform hit detection processing. If it does not exist, it means that no hit event has occurred, and perform general collision response processing.
[0072] 3. Collision Detection Processing (i.e., Hit Detection)
[0073] Based on the penetration length of the weapon and ammunition, on its penetration path, use the method of constructing a detection group and integrating the equivalent penetration length to calculate the collision results of the components in turn, and realize component-level hit detection.
[0074] (1) Among the collision bounding volume pair (A i , B i)In it, according to the weapon equipment, obtain A i and B i corresponding geometric model O i and T i , let the projectile ammunition be O i , and the object to be hit be T i , add all the collision bounding volumes and equivalent geometric bodies below the T i level in the geometric model hierarchy to the collision detection group G i of O i (g i1 , g i2 , … g im ).
[0075] (2) Taking the collision point coordinate P i as the origin, and the ray P in the direction of i V i , perform a ray detection on the collision detection group G i (g i1 , g i2 , … g im ) to obtain the first object g i on the penetration path of O ij .
[0076] (3) Calculate the equivalent thickness of g ij , as shown in Figure 3 , first use the ray P i V i to perform the first ray detection on g ij to obtain the first collision point coordinate P i1 (x i1 , y i1 , z i1 ), take any point P i P i1 ' on the extension line of P i (the distance from P i1 is greater than the maximum thickness of g ij ) as the origin, in the direction of to perform the second ray detection on g ij to obtain the second collision point coordinate P i2 (x i2 , y i2 , z i2 ), and the equivalent thickness of g ij is:
[0077]
[0078] where α j is for g ijThe protection coefficient of the material relative to the reference material is usually determined according to a semi-empirical formula summarized from physical experiments and materials science theories.
[0079] (4) Penetration judgment, for d ij accumulate, if ∑d ij ≤D i , where D i is the penetration distance of the ammunition O i into the reference material (usually homogeneous steel), then it is considered that g ij is penetrated, mark the functional component represented by g ij as hit, the hit type is marked as penetration, and remove g ij from G i and continue to execute step (2); if ∑d ij >D i , then it is considered that g ij is not penetrated, mark the functional component represented by g ij as hit, the hit type is marked as collision, the ammunition penetration process stops, and the hit detection ends.
[0080] 4. Hit effect generation
[0081] Define the hit effect generation tree of the equipment. One equipment model corresponds to one physical effect generation tree. The nodes of the tree include two parts: local effects and overall effects. Local effects are used to define the effects of damage to specific components, mainly to reflect the visual effects of damage, such as the fuel tank catching fire and exploding after being hit; overall effects are used to define the total damage effect of a class of components with the same function, mainly to reflect the object function and performance failure effects caused by damage, such as the impact on the vehicle's mobility performance caused by the damage of all components related to the mobility function, such as the engine, transmission case, and driving wheel. The format of the physical effect generation tree is as Figure 4 shown.
[0082] (1) For each hit component, search for the corresponding effect definition in the local effect node of the hit effect generation tree to generate local effects.
[0083] (2) Calculate the performance failure rate of the equipment function. The cumulative performance failure rate S f of the function f is calculated by the formula:
[0084]
[0085] S, f is the current performance failure rate of the function f, n is the number of hit components related to the function f in this hit event, α i is the performance weight of component i, β iIt is the damage coefficient of the ammunition hitting the component i, which is queried according to the ammunition type and hitting type in the corresponding component node of the hit effect tree.
[0086] (3) According to the performance failure rate S f Search for the corresponding performance failure effect definition under the overall effect node to generate the overall hit effect.
[0087] The technical advantages of the weapon equipment damage simulation method in this embodiment include:
[0088] Precise interaction: The component-level collision model can distinguish the effects of hitting different parts (such as hitting the fuel tank causing an explosion, hitting the track only reducing mobility).
[0089] Efficient calculation: The equivalent geometric body simplifies the internal model complexity, and the hierarchical binding reduces redundant detection, balancing accuracy and performance.
[0090] Dynamic response: The hierarchical relationship ensures that the collision model is updated in real time with the geometric model, supporting complex motion scenarios (such as turret rotation, vehicle bumpiness).
[0091] Efficiency improvement: Reduce ineffective detection and avoid repeated calculations for penetrated components.
[0092] Simulation authenticity: Ensure that the ammunition penetration process conforms to physical laws (such as continuing to penetrate inward after penetrating the outer layer).
[0093] Support for complex scenarios: Adapt to hit detection of complex structures such as multi-layer armor and internal equipment.
[0094] Penetration path and equivalent thickness: Achieve precise penetration simulation through ray detection and material coefficients, and accurately simulate the penetration effect of ammunition on components with different materials and thicknesses.
[0095] Effect generation tree: Link local damage and overall functional failure through hierarchical definition and failure rate calculation.
[0096] Dynamic update detection group: Optimize performance and enhance simulation real-time performance to ensure efficient processing of complex hit scenarios.
[0097] Embodiment 2
[0098] This embodiment provides a computer device, which can be a server or a terminal, and its internal structure diagram can be as Figure 5As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, abbreviated as I / O), and a communication interface. Among them, the processor, the memory, and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used for the data in the weapon equipment damage simulation method. The input / output interface of the computer device is used to exchange information between the processor and external devices. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, it realizes the weapon equipment damage simulation method in Embodiment 1.
[0099] Those skilled in the art can understand that Figure 5 the structure shown in is only a block diagram of some structures related to the solution of this application, and does not constitute a limitation on the computer device to which the solution of this application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements. In an exemplary embodiment, a computer device is provided, including a memory and a processor. A computer program is stored in the memory, and when the processor executes the computer program, the steps in the above method embodiments are realized.
[0100] Embodiment 3
[0101] This embodiment provides a computer-readable storage medium storing a computer program, and when the computer program is executed by a processor, it realizes the weapon equipment damage simulation method in Embodiment 1.
[0102] Embodiment 4
[0103] This embodiment provides a computer program product including a computer program, and when the computer program is executed by a processor, it realizes the weapon equipment damage simulation method in Embodiment 1.
[0104] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use, and processing of relevant data need to comply with relevant regulations.
[0105] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, database, or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memories. Non-volatile memories can include read-only memory (ROM), magnetic tapes, floppy disks, flash memories, optical memories, high-density embedded non-volatile memories, resistive random access memories (ReRAM), magnetoresistive random access memories (MRAM), ferroelectric random access memories (FRAM), phase change memories (PCM), graphene memories, etc. Volatile memories can include random access memories (RAM) or external cache memories, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc.
[0106] The databases involved in the embodiments provided in the present application can include at least one of relational databases and non-relational databases. Non-relational databases can include distributed databases based on blockchain, etc., without limitation. The processors involved in the embodiments provided in the present application can be general-purpose processors, central processors, graphics processors, digital signal processors, programmable logics, data processing logics based on quantum computing, etc., without limitation.
[0107] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope described in this specification.
[0108] Specific examples are used in this article to elaborate on the principles and implementation manners of the present application. The descriptions of the above embodiments are only used to help understand the method and its core idea of the present application; at the same time, for those of ordinary skill in the art, according to the idea of the present application, there will be changes in the specific implementation manners and application scopes. In summary, the content of this specification should not be construed as a limitation to the present application.
Claims
1. A method for simulating the damage of weapons and equipment, characterized in that, The described weapon equipment damage simulation method includes: For each piece of armed equipment, create an attribute collision bounding volume for the externally visible functional components of the armed equipment, and create an attribute equivalent geometric body for the internally invisible functional components of the armed equipment. Among them, the attribute collision bounding volume is a collision bounding volume with physical attributes and having a hierarchical relationship with the geometric model of the weapon equipment, and the equivalent geometric body is an equivalent geometric body with physical attributes and having a hierarchical relationship with the geometric model of the weapon equipment; Perform collision detection on all attribute collision bounding volumes to determine a set of collision pairs. Among them, the set of collision pairs includes several collision pairs, and each collision pair includes one of the attribute collision bounding volumes and the corresponding collision body; Judge whether there is a target collision pair in the set of collision pairs to obtain a first judgment result. Among them, the target collision pair is a collision pair whose collision body type is a projectile ammunition; If the first judgment result is yes, trigger the hit detection process; In the hit detection process, based on the collision point and collision direction of the target collision pair, judge whether the projectile ammunition penetrates the collision objects in the collision detection group to obtain a second judgment result, and determine the hit component according to the second judgment result. Among them, the collision objects are all attribute collision bounding volumes and attribute equivalent geometric bodies below the target attribute collision bounding volume level, and the target attribute collision bounding volume is the attribute collision bounding volume in the target collision pair; For each hit component, generate local damage effects and overall functional failure effects through a predefined hit effect generation tree.
2. The weapon equipment damage simulation method according to claim 1, characterized in that The creation process of the attribute collision bounding volume and the equivalent geometric body specifically includes: For each piece of armed equipment, separate the geometric model of the armed equipment from the physical collision model to obtain the separated physical collision model; Create a collision bounding volume for each externally visible functional component in the separated physical collision model, and create an equivalent geometric body for each internally invisible functional component; Bind all the collision bounding volumes and the equivalent geometric bodies to the geometric model and establish a hierarchical relationship to obtain the bound collision bounding volumes and the bound equivalent geometric bodies; Add physical attributes to the bound collision bounding volumes and the bound equivalent geometric bodies respectively to correspondingly obtain the attribute collision bounding volume and the equivalent geometric body. Among them, the physical attributes include material type, function type, and performance weight.
3. The weapon equipment damage simulation method according to claim 1, characterized in that Performing collision detection on all attribute collision bounding volumes to determine a set of collision pairs specifically includes: Use the hierarchical bounding box method to perform collision detection on all attribute collision bounding volumes to determine a set of collision pairs.
4. The weapon equipment damage simulation method according to claim 2, characterized in that Based on the collision point and collision direction of the target collision pair, judge whether the projectile ammunition penetrates the collision objects in the collision detection group to obtain a second judgment result, and determine the hit component according to the second judgment result specifically includes: According to the geometric model of the target attribute collision bounding volume and the geometric model of the ammunition collision body in the target collision pair, determine the collision detection group of the ammunition collision body; Taking the collision point of the target collision pair as the first origin, emitting a first ray along the collision direction of the target collision pair, performing ray detection on the collision detection group, and obtaining the first collision object on the penetration path of the ammunition collision body; Calculating the equivalent thickness of the first collision object according to the material protection coefficient and the actual thickness; Judging whether the projectile ammunition penetrates the collision object in the collision detection group according to the equivalent thickness and the preset penetration distance, and obtaining a second judgment result; If the second judgment result is yes, marking the functional component corresponding to the first collision object as hit, marking the hit type as penetration, removing the first collision object from the collision detection group, using the collision detection group after the removal operation as a new collision detection group, and returning to the step "Taking the collision point coordinates of the target collision pair as the origin, emitting a ray along the collision direction of the target collision pair, performing ray detection on the collision detection group, and obtaining the first collision object on the penetration path of the ammunition collision body"; If the second judgment result is no, marking the functional component corresponding to the first collision object as hit, marking the hit type as collision, and stopping the hit detection process.
5. The weapon equipment damage simulation method according to claim 4, wherein For each of the hit components, generating local damage effects and overall functional failure effects through a predefined hit effect generation tree, specifically including: For each of the hit components, searching for effect definitions in the local effect nodes of the predefined hit effect generation tree to generate local damage effects, where the local effect nodes are used to define the effects of specific functional component damage; Calculating the functional cumulative performance failure rate according to the functional type and performance weight of the hit component; Searching for effect definitions in the overall effect nodes of the predefined hit effect generation tree according to the functional cumulative performance failure rate to generate overall functional failure effects, where the overall effect nodes are used to define the total damage effects of a class of functional components with the same functional type.
6. The weapon equipment damage simulation method according to claim 4, characterized in that Calculating the equivalent thickness of the first collision object according to the material protection coefficient and the actual thickness, specifically including: Performing ray detection on the first collision object according to the first origin and the first ray to obtain the first collision point; Performing ray detection on the first collision object according to the second origin and the second ray to obtain the second collision point, where the second origin is any point on the extension line of the first line segment, the first line segment is determined according to the first origin and the first collision point, and the second ray is a ray emitted in the opposite direction of the collision direction of the target collision pair; Calculating the actual distance according to the coordinates of the first collision point and the coordinates of the second collision point; Calculating the equivalent thickness of the first collision object according to the material protection coefficient and the actual thickness, where the material protection coefficient is a variable determined according to the material type of the first collision object.
7. The weapon equipment damage simulation method according to claim 5, characterized in that The formula for calculating the functional cumulative performance failure rate is: Among them, S f is the cumulative performance failure rate of functions; S , f is the performance failure rate of the current function f; n is the number of hit components related to the function f in this hit event, and α i is the performance weight of the hit component i, and β i is the damage coefficient of this hit ammunition to the hit component i, and β i is a variable obtained by querying in the hit effect generation tree according to the ammunition type and the hit type.
8. A computer device, comprising: A memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that the processor executes the computer program to implement the weapon equipment damage simulation method according to any one of claims 1-7.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the weapon equipment damage simulation method described in any one of claims 1-7.
10. A computer program product comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the weapon equipment damage simulation method described in any one of claims 1-7.
Citation Information
Cited By
Simulation method and system for precise hit and damage effect superposition of Y-ray weapon, equipment and medium
CN120509221A