Collision rendering method and device, electronic equipment, storage medium and program product
By precalculating the collision feedback curve and synchronizing it to the rendering end, the performance bottleneck problem caused by real-time calculation of collision effects in the prior art is solved, and the rendering efficiency and user experience of virtual scenes are improved.
Patent Information
- Application Number
- CN202411079633.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-07
- Publication Date
- 2024-11-29
AI Technical Summary
Real-time computing of collision effects in the prior art causes excessive loading of device computing resources in large-scale and complex virtual scenarios, resulting in performance bottlenecks such as lag and delays, affecting user experience and fluency.
By obtaining the parameters of the collision object and the object being touched in the collision event, pre-calculate the target vibration curve, generate a collision feedback curve, and synchronize it to the rendering end, avoiding real-time calculation of vibration effects and reducing calculation burden.
It reduces the real-time computing pressure on the rendering side, improves the system rendering efficiency and user experience, and achieves efficient collision effect presentation.
Smart Images

Figure CN119048647A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of computer technology, and in particular to a collision rendering method, device, electronic device, storage medium and program product. Background Art
[0002] In virtual scenes such as games or animations, collision events are common interactive elements that enhance the immersion and experience of viewers or players. In order to make collision events more vivid, collision effects are usually added, such as the vibration effect of the colliding objects. These effects can make the virtual scene more realistic and allow users to feel the interaction with environmental elements.
[0003] However, collision effects are usually calculated in real time in the prior art. In large-scale scenes, especially in complex game or animation environments, such real-time calculations require high computing resources of the device, which often easily leads to performance problems such as freezing or delay. This situation not only affects the user's immersion and experience, but also may reduce the overall fluency of the game or animation, giving users a bad user experience. Summary of the invention
[0004] In view of this, an embodiment of the present invention provides a collision rendering method. One or more embodiments of the present invention also relate to a collision rendering device, a computing device, a computer-readable storage medium and a computer program product to solve the technical defects existing in the prior art.
[0005] According to a first aspect of an embodiment of the present invention, a collision rendering method is provided, comprising:
[0006] Obtain the collision object and the collided object in the collision event, and determine the collision parameters of the collision event;
[0007] Based on the collision parameters, determining a target first vibration curve of the collision object and a target second vibration curve of the collision object, wherein the target first vibration curve is used to characterize the vibration change of the collision object in the collision event, and the target second vibration curve is used to characterize the vibration change of the collision object in the collision event;
[0008] Determining a collision feedback curve based on the collision parameter, the target first vibration curve, and the target second vibration curve;
[0009] Synchronize the collision feedback curve to the rendering end to perform rendering operations.
[0010] According to a second aspect of an embodiment of the present invention, a collision rendering device is provided, comprising:
[0011] An acquisition module is configured to acquire a collision object and a collision object that collide in a collision event, and determine a collision parameter of the collision event;
[0012] A first determination module is configured to determine a target first vibration curve of the collision object and a target second vibration curve of the impacted object based on the collision parameters, wherein the target first vibration curve is used to characterize the vibration change of the collision object in the collision event, and the target second vibration curve is used to characterize the vibration change of the impacted object in the collision event;
[0013] A second determination module is configured to determine a collision feedback curve based on the collision parameter, the target first vibration curve and the target second vibration curve;
[0014] The rendering module is configured to synchronize the collision feedback curve to the rendering end to perform rendering operations.
[0015] According to a third aspect of an embodiment of the present invention, there is provided a computing device, including:
[0016] Memory and processor;
[0017] The memory is used to store computer programs / instructions, and the processor is used to execute the computer programs / instructions. When the computer programs / instructions are executed by the processor, the steps of the above-mentioned collision rendering method are implemented.
[0018] According to a fourth aspect of an embodiment of the present invention, a computer-readable storage medium is provided, which stores a computer program / instruction, and the computer program / instruction implements the steps of the above-mentioned collision rendering method when executed by a processor.
[0019] According to a fifth aspect of an embodiment of the present invention, a computer program product is provided, comprising a computer program / instruction, which implements the steps of the above-mentioned collision rendering method when executed by a processor.
[0020] An embodiment of the present invention realizes obtaining the collision object and the object being collided in the collision event, and determining the collision parameters of the collision event, and based on the collision parameters, determining the target first vibration curve of the collision object and the target second vibration curve of the object being collided, wherein the target first vibration curve is used to characterize the vibration change of the collision object in the collision event, and the target second vibration curve is used to characterize the vibration change of the object being collided in the collision event, and based on the collision parameters, the target first vibration curve and the target second vibration curve, determining the collision feedback curve, and synchronizing the collision feedback curve to the rendering end to perform the rendering operation. Based on this, the rendering end can directly use the pre-calculated collision feedback curve for rendering, avoiding the complex process of real-time calculation of vibration effects, and reducing the calculation burden and resource consumption. This method not only reduces the real-time calculation pressure of the rendering end, but also improves the overall rendering efficiency and user experience of the system. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] Figure 1 is a schematic diagram of interaction results of a collision rendering system provided by an embodiment of the present invention;
[0022] Figure 2 is a flow chart of a collision rendering method provided by an embodiment of the present invention;
[0023] Figure 3 is a processing flow chart of a collision rendering method provided by an embodiment of the present invention;
[0024] Figure 4 is a structural schematic diagram of a collision rendering device provided by an embodiment of the present invention;
[0025] Figure 5 It is a structural block diagram of a computing device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0026] Many specific details are set forth in the following description to facilitate a full understanding of the present invention. However, the present invention can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the connotation of the present invention, so the present invention is not limited to the specific implementation disclosed below.
[0027] The terms used in one or more embodiments of the present invention are only for the purpose of describing specific embodiments, and are not intended to limit one or more embodiments of the present invention. The singular forms of "a", "said" and "the" used in one or more embodiments of the present invention and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used in one or more embodiments of the present invention refers to and includes any or all possible combinations of one or more associated listed items.
[0028] It should be understood that, although the terms first, second, etc. may be used to describe various information in one or more embodiments of the present invention, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of the present invention, the first may also be referred to as the second, and similarly, the second may also be referred to as the first. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
[0029] In addition, 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 used for analysis, stored data, displayed data, etc.) involved in one or more embodiments of the present invention are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0030] In the design and implementation of virtual scenes such as games or animations, collision events are an extremely common and crucial component. Whether it is the interaction between game characters and the environment, or the contact reaction between various objects, collision events greatly enrich the realism and dynamic effects of the scene. In order to further enhance the immersive experience of the audience or players, modern game engines and animation production software usually add collision effects, such as deformation, rebound or vibration when objects collide. This kind of detailed processing not only increases the visual appeal, but also makes the entire virtual world more vivid and credible. For example, when a character jumps and lands on the ground, the slight vibration of the ground or the natural swing of the character's body can make this action look more natural and smooth, thereby enhancing the user's sense of participation and entertainment enjoyment.
[0031] However, in the related art, the real-time calculation of collision effects places high demands on the computing power of the device, especially when dealing with large-scale and highly complex virtual scenes. Since the collision effect involves the precise calculation of the physics engine, including but not limited to collision detection, determination of response parameters, and updating of the state of objects after collision, these processes often require a large amount of computing resources. When intensive collision events occur, such as explosions in battlefield scenes, collisions of large-scale objects, or complex environmental interactions, real-time calculation of collision effects may cause a surge in the load of the device's CPU and GPU, which in turn causes problems such as decreased frame rate, increased latency, and even program crashes. This performance bottleneck not only affects the smooth operation of games or animations, but also destroys the user experience, especially for high-end players who pursue extreme image quality and response speed. Any slight stuttering may seriously affect their immersion and the quality of the gaming experience. Therefore, there is an urgent need for a method that can maintain the fidelity of the collision effect and effectively control the computing cost, which has become a key issue that virtual scene designers need to solve.
[0032] In the present invention, a collision rendering method is provided. The present invention also relates to a collision rendering system, a collision rendering device, a computing device, a computer-readable storage medium, and a computer program product, which are described in detail one by one in the following embodiments.
[0033] See also Figure 1 , Figure 1It is a schematic diagram of the interaction results of a collision rendering system provided by an embodiment of the present invention, and the collision rendering system includes a user terminal, a client, a server, and a rendering end. The user terminal is used to trigger a collision event; the client is used to obtain the collision object and the object being collided in the collision event, and determine the collision parameters of the collision event, and synchronize the collision object, the object being collided, and the collision parameters to the server; the server is used to determine the target first vibration curve of the collision object and the target second vibration curve of the object being collided based on the collision parameters, wherein the target first vibration curve is used to characterize the vibration change of the collision object in the collision event, and the target second vibration curve is used to characterize the vibration change of the object being collided in the collision event, and the collision feedback curve is determined based on the collision parameters, the target first vibration curve, and the target second vibration curve; the server is also used to synchronize the collision feedback curve to the rendering end; the rendering end is used to perform rendering operations according to the collision feedback curve.
[0034] Applied to the collision rendering system, when the user terminal triggers a collision event, the client captures the collision object and the object being hit in the event, determines the relevant collision parameters, and then immediately synchronizes these data to the server. After receiving the collision parameters, the server uses advanced algorithm analysis to pre-calculate the target first vibration curve of the collision object and the target second vibration curve of the object being hit. These two curves respectively and finely depict the vibration change characteristics of the two colliding parties in the collision event. Then, the server integrates the collision parameters, the target first vibration curve and the target second vibration curve to comprehensively generate a collision feedback curve. This curve is a comprehensive expression of the collision effect and accurately reflects the dynamic changes at the moment of collision and subsequent changes. Subsequently, the server transmits the collision feedback curve to the rendering end, so that the rendering end does not need to repeatedly calculate the collision effect in the real-time scene, but directly performs the rendering operation based on the pre-calculated collision feedback curve. This not only significantly reduces the real-time calculation burden of the rendering end and improves the rendering efficiency, but also ensures the high-quality presentation of the collision effect, thereby greatly optimizing the overall user experience and achieving a collision rendering effect that is both efficient and realistic.
[0035] See also Figure 2 , Figure 2 It is a flow chart of a collision rendering method provided by an embodiment of the present invention, which specifically includes the following steps.
[0036] Step 202: Acquire the collision object and the collision object that collide in the collision event, and determine the collision parameters of the collision event.
[0037] In a virtual scene, a collision event refers to a situation where two or more virtual objects come into contact or interact during simulation or rendering.
[0038] In actual applications, the system first detects that two or more objects in the scene have collided. This is usually achieved through a physics engine or collision detection algorithm. These detection mechanisms monitor the movement and interaction of objects to identify when an actual collision has occurred. Once a collision event occurs, the system determines the objects involved in the collision, including: the colliding object, the object that actively collides; the hit object, another object that is hit by the colliding object during the collision event. For these two objects, the system collects their basic information, such as position, velocity, mass, shape, etc. This information is usually calculated and stored in the physics engine. Collision parameters are data used to describe the details of the collision event, such as: collision point, used to describe the specific location where the collision occurred; collision normal vector, used to describe the normal vector at the collision point, indicating the direction of the collision; collision velocity, used to describe the relative velocity of the two objects at the time of the collision; collision force, used to describe the force or pressure applied during the collision; collision time, used to describe the time point when the collision event occurred. Record and store collision parameters: The calculated collision parameters are recorded and stored in the system for subsequent processing. The system may store these parameters in memory or maintain this information in a data structure to facilitate subsequent vibration curve calculation and collision effect rendering.
[0039] In a specific embodiment of the present invention, in a virtual game scene, an attacking weapon (such as a sword) hits an object to be hit (such as an enemy). The physical system of the game engine detects that a collision has occurred between the attacking action of the sword and the enemy. The physics engine uses a collision detection algorithm (such as bounding box collision detection, sphere collision detection, etc.) to identify this collision. The engine monitors the position and motion state of the sword and the enemy, and finds that the attack path of the sword overlaps with the enemy's body. It is determined that the collision object (active attacking object) is the sword, and the object to be hit is the enemy.
[0040] Collect basic information about the collision object: the sword's position (e.g., the exact position of the sword's end on the enemy's body), speed (the sword's movement speed), mass (the sword's weight), and shape (the sword's geometry). The enemy's position (the position where the enemy was hit), speed (the enemy's possible movement speed due to the attack), mass (the enemy's weight), and shape (the enemy's body model).
[0041] Calculate collision parameters, such as the collision point, the specific location where the sword's blade touches the enemy's body, such as a point where the blade just cuts into the enemy's chest. The collision normal vector, which describes the normal vector at the collision point, indicates the direction of the sword's attack, such as the angle of penetration perpendicular to the enemy's body. The collision speed, the relative speed of the sword and the enemy when they make contact, such as a sword hitting the enemy at a speed of 5 meters per second. The collision force, the force applied by the sword when it hits the enemy, such as the impact force caused by the speed and mass of the sword. The collision time, the time point when the collision event occurs, such as the in-game timestamp of 10:25:30.123. Record and store collision parameters: The game engine records these collision parameters in memory for subsequent processing. For example, they are stored in the collision data structure and used to update the enemy's health, generate hit effects (such as the enemy being knocked away, blood splattering, etc.), and perform vibration feedback and rendering effects.
[0042] Furthermore, obtaining a collision object and a collision object that collide in a collision event includes: when a collision event is detected, obtaining a first object identifier of a first object and a second object identifier of a second object that collide in the collision event; obtaining a first moving speed based on the first object identifier, and obtaining a second moving speed based on the second object identifier; and determining a collision object and a collision object in the first object and the second object based on the first moving speed and the second moving speed.
[0043] In practical applications, when objects collide, the system triggers a collision event. This usually involves a collision detection system or a physics engine. The identifiers (IDs) of the two objects that collide are obtained from the collision event, including a first object identifier (ID1), which represents one of the objects involved in the collision in the collision event; and a second object identifier (ID2), which represents the other object involved in the collision in the collision event. Using the first object identifier (ID1), the current moving speed of the object is queried from the physics engine or object management system, which usually involves accessing the state information of the object, such as the velocity vector (vx, vy, vz); using the second object identifier (ID2), the current moving speed of the object is queried from the physics engine or object management system. Comparing the velocity vectors of the first object and the second object, usually, the velocity of the colliding object will be higher, while the velocity of the collided object will be lower (especially when the velocity change of the passive party during the collision is small). According to the context of the collision event, determine which object is the active collision (usually the object with a higher velocity) and which is the passive collision (usually the object with a lower velocity).
[0044] If the speed of the first object is higher, it can be inferred that the first object is the collision object and the second object is the collision object. If the speed of the second object is higher, the second object is the collision object and the first object is the collision object.
[0045] In a specific embodiment of the present invention, suppose that in a game, a collision event occurs. The collision event is triggered, and the system records the collision information. The collision object identifiers obtained include the first object identifier (ID1), object A; the second object identifier (ID2), object B. The speed of object A queried from the system is (10,0,0) m / s. The speed of object B queried from the system is (2,0,0) m / s. The speed of object A is significantly higher than that of object B. Based on the speed difference, it is inferred that object A is the collision object and object B is the hit object.
[0046] Based on this, the colliding object and the collided object in the collision event can be accurately obtained, and their roles can be determined based on their velocity information, which helps to perform accurate physical calculations and feedback later.
[0047] Furthermore, the collision parameters include a collision speed and a collision direction; determining the collision parameters of the collision event includes: obtaining a third moving speed of the collision object and a fourth moving speed of the collided object; determining a collision surface between the collision object and the collided object; determining the collision direction based on the third moving speed, the fourth moving speed and the collision surface; determining the collision speed based on the third moving speed, the fourth moving speed and the collision direction.
[0048] Among them, the third moving speed is the moving speed of the collision object, and the aforementioned first moving speed is the moving speed of the first object. If the first object is the collision object, the first moving speed is the same as the third moving speed. The fourth moving speed is the same. The collision surface is the surface on which two objects contact. In a 3D environment, the collision surface can usually be determined by calculating the normal vector of the collision point. The collision direction is the direction of movement of the collision object on the collision surface. It can usually be determined by the normal of the collision surface and the speed of the two objects. The collision speed is the approach speed of the collision object relative to the collided object, that is, the speed component of the two in the collision direction.
[0049] In practical applications, the current moving speed of the collision object and the current moving speed of the collision object are obtained. The information of the collision point is obtained from the collision event. The normal vector of the collision surface is calculated by the collision point and the geometric characteristics of the two objects. For example, the surface normal of the object can be used or the normal at the collision point can be calculated. The third moving speed and the fourth moving speed are projected onto the collision surface respectively, which can be done by calculating the component of the speed vector on the normal of the collision surface. According to the projection direction of the speed, the collision direction is determined. Usually, the collision direction is the speed direction of the collision object minus the speed direction of the collision object. Calculate the components of the third moving speed and the fourth moving speed in the collision direction. The vector dot product can be used to calculate the components of the two speed vectors in the collision direction. Subtract the speed components of the collision object and the collision object in the collision direction to obtain the collision speed.
[0050] In a specific embodiment of the present invention, assume that in a game, a collision event occurs between object A (collision object) and object B (collided object). The velocity of object A is obtained as (12, 3, -4) m / s. The velocity of object B is (2, -1, 1) m / s.
[0051] Assume the collision point is (5,1,2). Using the collision point and the geometric data of the two objects (such as the surface normals of the objects or the normal vectors obtained from the collision event), the normal vector is (0,1,0). Based on the difference in velocity components, the collision direction is (12-2,3-(-1),-4-1) = (10,4,-5).
[0052] Compute the component of the velocity in the direction of the collision:
[0053] Velocity component of object A: The component in the collision direction can be obtained by calculating the dot product of the velocity vector and the collision direction.
[0054] Velocity component of object B: Similarly, calculate the velocity component of object B in the direction of the collision.
[0055] The collision velocity is obtained by subtracting the velocity components of object A and object B in the collision direction.
[0056] Based on this, the collision parameters of the collision event can be obtained and calculated, including the collision direction and collision speed, which provides a basis for further generating real collision effects and physical reactions.
[0057] Step 204: Based on the collision parameters, determine a target first vibration curve of the collision object and a target second vibration curve of the impacted object, wherein the target first vibration curve is used to characterize the vibration change of the collision object in the collision event, and the target second vibration curve is used to characterize the vibration change of the impacted object in the collision event.
[0058] In practical applications, the preliminary conditions of vibration are determined based on the parameters of the collision event (such as collision point, collision normal vector, collision speed, collision force, etc.). For example, the magnitude and direction of the collision force will directly affect the amplitude and direction of the vibration. Use physical models or vibration analysis methods to calculate the vibration characteristics of the object. This usually includes: Frequency analysis, the vibration caused by the collision can be described by frequency analysis. High-frequency components usually represent faster vibration modes, and low-frequency components represent slower vibration modes. Vibration amplitude, which is determined by the magnitude of the collision force. For example, the greater the collision force, the greater the vibration amplitude. Vibration attenuation, the attenuation characteristics of the vibration over time. For example, the vibration may gradually weaken due to friction.
[0059] For the target first vibration curve (vibration change of the collision object), determine the vibration mode of the collision object (such as a sword). Consider the location of the collision point, the direction and magnitude of the collision force, and establish a vibration model. Generate a time series curve describing the vibration of the collision object through a physical model or simulation method. This curve represents the vibration change of the collision object during the collision event, including characteristics such as vibration frequency, amplitude, and attenuation.
[0060] For the target second vibration curve (the vibration change of the impacted object), determine the vibration mode of the impacted object (such as an enemy). Analyze the impact of the collision force on the impacted object, including the propagation, reflection and attenuation of the vibration. Generate a time series curve describing the vibration of the impacted object. This curve represents the vibration change of the impacted object during the collision event, including characteristics such as vibration frequency, amplitude and attenuation.
[0061] Furthermore, based on the collision parameters, a target first vibration curve of the collision object and a target second vibration curve of the collided object are determined, including: determining a numerical interval hit by the collision parameters, and determining an interval identifier of the numerical interval; based on the interval identifier, screening a target first vibration curve corresponding to the interval identifier from among candidate first vibration curves, wherein the candidate first vibration curve is used to characterize the vibration change of the collision object under the collision parameters of each preset numerical interval; based on the interval identifier, screening a target second vibration curve corresponding to the interval identifier from among candidate second vibration curves, wherein the candidate second vibration curve is used to characterize the vibration change of the collided object under the collision parameters of each preset numerical interval.
[0062] In practical applications, the collision speed is divided into several intervals according to its value. For example, the speed can be divided into low speed, medium speed and high speed intervals. According to the angle of the collision direction, it may be divided into multiple direction intervals (such as front, side, oblique, etc.).
[0063] Assign a unique identifier to each numerical interval. For example, interval 1 may represent the speed range [0,10]m / s, interval 2 may represent the speed range [10,20]m / s, etc. Based on the numerical interval identifier, select the target vibration curve corresponding to the collision parameter from the candidate vibration curves. Use the interval identifier of the collision parameter to find the corresponding candidate vibration curve. For example, if the collision speed falls in interval 2, select the curve marked as interval 2 in the candidate vibration curve as the target vibration curve.
[0064] In a specific embodiment of the present invention, the speed intervals are defined as follows: Interval 1: speed [0,10] m / s. Interval 2: speed [10,20] m / s. The collision speed of 15 m / s falls in interval 2. For the collision object, the curve marked as interval 2 is selected as the target first vibration curve of the collision object. For the collision object, the curve marked as interval 2 is selected as the target second vibration curve of the collision object.
[0065] Based on this, the target vibration curves of the colliding object and the collided object can be determined and applied based on the collision parameters. The real vibration response after the collision can be simulated and displayed, thereby improving the realism and interactive effects in simulations or games.
[0066] Furthermore, before determining the numerical interval hit by the collision parameter and determining the interval identifier of the numerical interval, it also includes: receiving interval identifiers of multiple numerical intervals for the collision parameter sent by the front end; for any interval identifier, determining the test collision parameter corresponding to any interval identifier; based on the test collision parameter and each scene object, calculating the candidate vibration curve corresponding to any interval identifier, wherein each scene object is an object in the target scene, and each scene object includes a collision object and a collided object.
[0067] The test collision parameter is the average or median of the numerical range.
[0068] In actual applications, the front-end system or other data source receives multiple numerical intervals and their identifiers for collision parameters. For each received interval identifier, a test collision parameter is determined. The test collision parameter is usually a representative value of the interval, which can be the mean or median of the interval. The upper and lower limits of the interval are averaged. For example, the mean of the interval [10,20] is (10+20) / 2=15. If the interval is represented in the form of discrete data, the median can be calculated. For example, the median of the interval [5,15,25] is 15.
[0069] For each test collision parameter, the corresponding candidate vibration curve is calculated based on the interaction between the parameter and each object in the scene (including the collision object and the object being hit). Physical simulation is performed using the test collision parameters (such as speed, direction, etc.) to calculate the vibration response under the parameter. This involves the use of a physics engine or vibration model. For example, for a test collision parameter with a speed of 15m / s, the vibration curves of the collision object and the object being hit at this speed are calculated by simulating the physical properties of the collision object and the object being hit.
[0070] Based on this, pre-calculating candidate vibration curves corresponding to the numerical range of collision parameters is an efficient method, which can significantly reduce the computing cost, optimize system performance, and enhance the user's gaming or simulation experience while maintaining the authenticity and diversity of collision effects.
[0071] Step 206: Determine a collision feedback curve based on the collision parameter, the target first vibration curve, and the target second vibration curve.
[0072] The collision feedback curve is a vibration curve generated by a collision event in a virtual environment, which shows the joint vibration effect of the colliding object and the object being collided. The main function of the collision feedback curve is to provide a realistic representation of the collision effect in the virtual environment, so that users can feel the actual effect of the collision between objects.
[0073] In actual application, based on the collision parameters, calculate the characteristics of vibration propagation from the collision point to the surface of the object. Consider the transmission effect of vibration on the colliding object and the object being hit. Combine the target first vibration curve and the target second vibration curve to generate a comprehensive vibration curve. This curve will show the comprehensive effect of vibration during the collision process. Use the data of the target vibration curve, combined with the collision parameters, to generate a curve that describes the vibration response during the entire collision event. This curve will comprehensively reflect the intensity, direction and vibration propagation effect of the collision. Adjust the feedback curve to ensure that it truly reflects the physical effect of the collision. For example, the amplitude, frequency and attenuation characteristics of the vibration may need to be adjusted to match the actual collision effect.
[0074] In a specific embodiment of the present invention, in a virtual game scene, an attacking weapon (sword) hits an object (enemy). The vibration curve of the sword and the vibration curve of the enemy are superimposed, taking into account the interaction and comprehensive effects of the vibrations. A comprehensive vibration curve including vibration frequency, amplitude and attenuation is generated to reflect the comprehensive vibration effect between the sword and the enemy during the collision. Adjusting the comprehensive vibration curve may include adjusting the vibration amplitude according to the collision force and the response of the object, for example, ensuring that the comprehensive vibration amplitude is within the actual perception range; adjusting the vibration frequency according to the material and collision characteristics of the object to ensure that the curve matches the actual collision effect; and adjusting the vibration attenuation characteristics to ensure that the vibration performance in time conforms to the actual physical effect.
[0075] Suppose in the game, when a sword hits an enemy, the vibration feedback curve is as follows:
[0076] Vibration curve of the sword: It shows that the vibration frequency of the sword increases from 30Hz to 100Hz, the vibration amplitude gradually decreases from 5mm to 2mm, and the vibration decays by 50% within 0.5 seconds.
[0077] Enemy vibration curve: shows that the enemy's vibration frequency ranges from 20Hz to 80Hz, the vibration amplitude gradually decreases from 10mm to 3mm, and the vibration decays by 70% within 1 second.
[0078] These two curves are combined to generate a comprehensive vibration curve that reflects the combined effect of the sword hitting the enemy. By adjusting and optimizing this curve, we ensure that it truly reflects the physical effect of the sword hitting the enemy, so that players can feel realistic collision feedback.
[0079] Furthermore, the collision parameters include a time influence coefficient and an amplitude influence coefficient; determining the collision parameters of the collision event includes: obtaining the time influence coefficient corresponding to the touched identifier based on the object identifier and the touched identifier of the collided object; obtaining the amplitude influence coefficient corresponding to the touched identifier based on the object identifier and the collision identifier of the colliding object.
[0080] The collision mark is used to indicate that the object is the initiator of the collision event, and the hit mark indicates that the object is the recipient of the collision event.
[0081] In practical applications, first, the object being hit is identified, and the system will look for a preset time influence coefficient based on its object ID and the hit ID that characterizes the identity of the object being hit. This coefficient reflects the duration of the vibration of the object after a collision. It is usually stored in a database or configuration file and is associated with the physical properties and design requirements of each object. Similarly, based on the object ID and collision ID of the collision object, the system will look for the amplitude influence coefficient associated with it. This coefficient determines the amplitude of the object's vibration after the collision. Similarly, these data are also pre-set and reflect factors such as the stiffness and elasticity of the object.
[0082] Based on this, the method of directly obtaining collision parameters based on identification simplifies the collision processing process. There is no need to rely on collision information of collision events, which improves the performance of the system. At the same time, it gives designers more control and creative space, making the physical interaction in the virtual world both efficient and expressive.
[0083] Furthermore, the horizontal axes of the target first vibration curve and the target second vibration curve represent the vibration time, the vertical axes of the target first vibration curve and the target second vibration curve represent the vibration amplitude, and the collision parameters include the collision direction, the time influence coefficient and the amplitude influence coefficient; based on the collision parameters, the target first vibration curve and the target second vibration curve, a collision feedback curve is determined, including: adjusting the horizontal axes of the target first vibration curve and the target second vibration curve based on the time influence coefficient, and adjusting the vertical axes of the target first vibration curve and the target second vibration curve based on the amplitude influence coefficient to obtain an updated first vibration curve and an updated second vibration curve; according to the collision direction, the updated first vibration curve and the updated second vibration curve are merged to obtain a collision feedback curve.
[0084] In practical applications, the horizontal axis (time) of the target first vibration curve and the target second vibration curve is adjusted using the time influence coefficient. New time = original time × time influence coefficient, traverse all time points of the target first and target second vibration curves, and replace the original horizontal axis with the adjusted time.
[0085] The vertical axis (amplitude) of the target first vibration curve and the target second vibration curve is adjusted using the amplitude influence coefficient. New amplitude = original amplitude × amplitude influence coefficient. All amplitude points of the target first and target second vibration curves are traversed, and the original vertical axis is replaced with the adjusted amplitude. The updated first vibration curve and the updated second vibration curve are obtained. After adjustment, these two curves respectively reflect the new time and amplitude characteristics under the influence of the collision parameters.
[0086] Depending on the specific direction of the collision, decide how to merge the updated curves. For example, if the collision direction is positive, the updated first curve can be directly superimposed with the updated second curve. If the collision direction is negative, the second curve can be reversed and superimposed with the first curve.
[0087] The updated first vibration curve and the updated second vibration curve are combined by using a suitable method (such as simple addition, linear interpolation, etc.) to obtain a final collision feedback curve.
[0088] Based on this, by adjusting the vibration curve through the time influence coefficient and the amplitude influence coefficient, the vibration effect produced after the collision can be simulated more accurately, making the simulation result closer to the actual situation. This adjustment can take into account the specific reactions of different materials, objects or scenes, thereby improving the overall sense of reality. Different time and amplitude adjustments allow the vibration curve to carefully reflect the specific characteristics of the collision, such as the duration of the collision and the vibration intensity.
[0089] Furthermore, according to the collision direction, the updated first vibration curve and the updated second vibration curve are merged to obtain a collision feedback curve, including: calculating the difference in amplitude at each time point in the updated first vibration curve and the updated second vibration curve to obtain an initial feedback curve; calculating the component of the amplitude at the time point in the initial feedback curve in the collision direction to obtain the collision feedback curve.
[0090] In practical applications, for each time point t, the difference between the amplitude of the updated first vibration curve and the amplitude of the updated second vibration curve at that time point is calculated. If the amplitude of the updated first vibration curve at time t is A(t), and the amplitude of the updated second vibration curve at time t is B(t), then the difference D(t) = |A(t)-B(t)|. The difference D(t) at all time points t is combined into a new curve, namely the initial feedback curve.
[0091] For each time point t, find the corresponding D(t) value on the initial feedback curve and convert it into vector form Dv(t) by multiplying it by the unit vector in the direction of the collision velocity. Then, calculate the projection of Dv(t) in the collision direction. If the unit vector in the collision direction is n, then the projection P(t) = Dv(t)·n, where “·” represents the dot product. Collect the projection values P(t) at all time points t and combine them into the final collision feedback curve.
[0092] Based on this, when two objects collide, by analyzing the vibration curve and combining it with the collision direction, more accurate collision feedback can be generated, making the collision effect more realistic, such as the rebound, sliding or deformation of objects.
[0093] Step 208: Synchronize the collision feedback curve to the rendering end to perform rendering operations.
[0094] In practical applications, converting the vibration curve data into a format recognizable by the rendering system may involve storing the curve data in a specific data structure, such as an array, a buffer, or other suitable formats. Transmitting the vibration data to the rendering system through an interface may involve transmitting through memory, a network, or other data transmission mechanisms.
[0095] In the rendering end, apply the collision feedback curve data to the relevant rendering objects. For example, update the vibration effect parameters of the object, or adjust the animation state of the object. Bind the vibration data to the material, texture or other visual attributes of the rendering object. For example, adjust the displacement of the texture or change the deformation effect of the object according to the vibration curve. Perform rendering operations based on the data of the vibration feedback curve. Specifically, it includes: applying the frequency and amplitude information of the vibration curve to generate the vibration effect of the object after the collision, for example, by using vertex displacement or noise function to make the object appear to vibrate visually; generating an impact effect according to the intensity of the collision. For example, use a particle system to simulate the debris, dust or light effects generated by the collision; adjust the animation state of the object to make it consistent with the collision feedback curve, for example, update the character's hit animation or the object's vibration animation.
[0096] In a specific embodiment of the present invention, in a game, the vibration feedback curve generated when a sword hits an enemy is as follows:
[0097] Vibration frequency: 30-100Hz
[0098] Vibration amplitude: gradually reduced from 5 mm to 2 mm
[0099] Vibration attenuation: 50% attenuation in 0.5 seconds
[0100] On the rendering side, apply vibration frequency and amplitude information to the enemy model so that the enemy model vibrates when hit. Apply vibration data to the enemy material to achieve visual vibration through displacement textures or vertex animation. Generate particle effects at the collision point, such as dust flying or debris flying. Play the corresponding impact sound, synchronized with the vibration effect, to enhance the sensory feedback of the collision.
[0101] Furthermore, the horizontal axis of the collision feedback curve represents the vibration time, and the vertical axis represents the vibration amplitude; the collision feedback curve is synchronized to the rendering end to perform rendering operations, including: determining the effect rendering time based on the vibration time, and determining the effect amplitude based on the vibration amplitude; determining the collision effect based on the collision object and the collided object; rendering the collision effect according to the effect rendering time and effect amplitude.
[0102] In practice, the collision feedback curves are sent to the rendering engine, which is the part of the software responsible for graphics output. The rendering side interprets the curve data in order to apply the correct visual effect at the appropriate time.
[0103] The rendering end determines when to render the collision effect (i.e., the effect rendering moment) and the intensity of the effect (i.e., the effect amplitude) based on each point of the collision feedback curve. For example, at the moment of collision, there may be sparks flying; as the vibration amplitude decreases, the number and brightness of the sparks will also decrease accordingly. Collision effects include but are not limited to:
[0104] Sparks: When two hard objects collide at high speed, spark effects can be generated. This is usually achieved through a particle system to simulate a scene where sparks fly.
[0105] Vibration: The vibration of an object after a collision can be expressed through animation or physics simulation, such as a shaking of a character or object.
[0106] Blood: If the collision involves a living organism, you may want to render blood splatter effects, which can also be done with a particle system and texture maps.
[0107] The type of collision effect also depends on what the two parties are. For example, the effect of a car hitting a wall will be very different from the effect of two people hitting each other. The system needs to identify the type of objects that collided in order to choose the appropriate visual and auditory feedback. Finally, the rendering engine will render the collision effect on the screen based on all the above information, including any visual changes, particle effects, vibration feedback or sound effects.
[0108] Based on this, since the collision feedback curve can accurately map the relationship between vibration time and amplitude, the rendering engine can know exactly when and how strongly to show the collision effect. This means that unnecessary over-rendering can be avoided, and the effect is only rendered at the correct intensity at the required time point, saving computing resources. The collision feedback curve provides a smooth transition effect and avoids hard cuts with sudden changes, which helps reduce the instantaneous pressure on the GPU. Smooth transitions mean that there will be no drastic calculation peaks during the rendering process.
[0109] Applied to the embodiment of the present invention, the collision object and the object being collided in the collision event are obtained, and the collision parameters of the collision event are determined. Based on the collision parameters, the target first vibration curve of the collision object and the target second vibration curve of the object being collided are determined, wherein the target first vibration curve is used to characterize the vibration change of the collision object in the collision event, and the target second vibration curve is used to characterize the vibration change of the object being collided in the collision event. Based on the collision parameters, the target first vibration curve and the target second vibration curve, a collision feedback curve is determined, and the collision feedback curve is synchronized to the rendering end to perform the rendering operation. Based on this, the rendering end can directly use the pre-calculated collision feedback curve for rendering, avoiding the complex process of real-time calculation of vibration effects, and reducing the calculation burden and resource consumption. This method not only reduces the real-time calculation pressure of the rendering end, but also improves the overall rendering efficiency and user experience of the system.
[0110] The following combination Figure 3 Taking the application of the collision rendering method provided by the present invention in a game where an attacking weapon hits an object as an example, the collision rendering method is further described. Figure 3 It is a processing flow chart of a collision rendering method provided by an embodiment of the present invention, which specifically includes the following steps.
[0111] Step 302: After being hit, the hit object uses the collision detection algorithm of the physical engine to calculate the collision normal direction and collision speed.
[0112] Among them, the attacking weapon corresponds to an elastic coefficient, and the object being hit corresponds to a damping coefficient. The elastic coefficient is used to control the vibration amplitude, and the damping coefficient is used to control the vibration time.
[0113] Step 304: Determine the object vibration curve and the weapon vibration curve from the multiple vibration curves corresponding to the struck object and the attacking weapon respectively.
[0114] Among them, the elastic coefficient, damping coefficient, and each vibration curve are normalized.
[0115] Step 306: Calculate the overall vibration curve of the object and the weapon from the elastic coefficient, the damping coefficient, the vibration curve of the object and the vibration curve of the weapon, and the loss time.
[0116] Specifically, the vibration curve of the object is subtracted from the vibration curve of the weapon, the horizontal axis of the curve is controlled by the elastic coefficient, and the vertical axis of the curve is controlled by the damping coefficient. Starting from the time of being hit, the elapsed time is recorded, and the amplitude of the vertical axis is calculated by scaling the coefficient of the subtracted curve.
[0117] Step 308: Using the collision normal direction, calculate the component of the overall vibration curve in the collision normal direction.
[0118] Step 310: Synchronize the component of the overall vibration curve in the direction of the collision normal to the rendering end for subsequent rendering.
[0119] Specifically, the component of the overall vibration curve in the direction of the collision normal is used by other systems, such as a lens shake system, a blood damage system, and a special effect initial speed.
[0120] Corresponding to the above method embodiment, the present invention also provides a collision rendering device embodiment, Figure 4 FIG. 1 is a schematic diagram of a collision rendering device provided by an embodiment of the present invention. Figure 4 As shown, the device comprises:
[0121] The acquisition module 402 is configured to acquire the collision object and the collision object in the collision event, and determine the collision parameters of the collision event;
[0122] A first determination module 404 is configured to determine a target first vibration curve of the collision object and a target second vibration curve of the collision object based on the collision parameters, wherein the target first vibration curve is used to characterize the vibration change of the collision object in the collision event, and the target second vibration curve is used to characterize the vibration change of the collision object in the collision event;
[0123] A second determination module 406 is configured to determine a collision feedback curve based on the collision parameter, the target first vibration curve and the target second vibration curve;
[0124] The rendering module 408 is configured to synchronize the collision feedback curve to the rendering end to perform a rendering operation.
[0125] Optionally, the acquisition module 402 is further configured to, when a collision event is detected, obtain a first object identifier of a first object and a second object identifier of a second object that collide in the collision event; obtain a first moving speed based on the first object identifier, and obtain a second moving speed based on the second object identifier; and determine a colliding object and a collided object in the first object and the second object based on the first moving speed and the second moving speed.
[0126] Optionally, the collision parameters include a collision speed and a collision direction; correspondingly, the acquisition module 402 is further configured to acquire a third moving speed of the collision object and a fourth moving speed of the collided object; determine a collision surface between the collision object and the collided object; determine the collision direction based on the third moving speed, the fourth moving speed and the collision surface; determine the collision speed based on the third moving speed, the fourth moving speed and the collision direction.
[0127] Optionally, the first determination module 404 is further configured to determine the numerical interval hit by the collision parameter and determine the interval identifier of the numerical interval; based on the interval identifier, filter the target first vibration curve corresponding to the interval identifier in the candidate first vibration curve, wherein the candidate first vibration curve is used to characterize the vibration change of the collision object under the collision parameters of each preset numerical interval; based on the interval identifier, filter the target second vibration curve corresponding to the interval identifier in the candidate second vibration curve, wherein the candidate second vibration curve is used to characterize the vibration change of the collision object under the collision parameters of each preset numerical interval.
[0128] Optionally, the first determination module 404 is further configured to receive interval identifiers of multiple numerical intervals for collision parameters sent by the front end; for any interval identifier, determine the test collision parameters corresponding to any interval identifier; and calculate the candidate vibration curve corresponding to any interval identifier based on the test collision parameters and each scene object, wherein each scene object is an object in the target scene, and each scene object includes a collision object and a collided object.
[0129] Optionally, the collision parameters include a time influence coefficient and an amplitude influence coefficient; correspondingly, the acquisition module 402 is further configured to acquire the time influence coefficient corresponding to the touched identifier based on the object identifier and the touched identifier of the collided object; and acquire the amplitude influence coefficient corresponding to the touched identifier based on the object identifier and the collision identifier of the colliding object.
[0130] Optionally, the horizontal axis of the target first vibration curve and the target second vibration curve represents the vibration time, the vertical axis of the target first vibration curve and the target second vibration curve represents the vibration amplitude, and the collision parameters include the collision direction, the time influence coefficient and the amplitude influence coefficient; correspondingly, the second determination module 406 is further configured to adjust the horizontal axis of the target first vibration curve and the target second vibration curve based on the time influence coefficient, and adjust the vertical axis of the target first vibration curve and the target second vibration curve based on the amplitude influence coefficient to obtain the updated first vibration curve and the updated second vibration curve; according to the collision direction, the updated first vibration curve and the updated second vibration curve are merged to obtain the collision feedback curve.
[0131] Optionally, the second determination module 406 is further configured to calculate the difference between the amplitude at each time point in the updated first vibration curve and the updated second vibration curve to obtain an initial feedback curve; calculate the component of the amplitude at the time point in the initial feedback curve in the collision direction to obtain a collision feedback curve.
[0132] Optionally, the horizontal axis of the collision feedback curve represents the vibration time, and the vertical axis represents the vibration amplitude; correspondingly, the rendering module 408 is further configured to determine the effect rendering time based on the vibration time, and determine the effect amplitude based on the vibration amplitude; determine the collision effect based on the colliding object and the collided object; render the collision effect according to the effect rendering time and the effect amplitude.
[0133] Applied to the collision rendering device, the acquisition module 402 is responsible for capturing the collision object and the object being hit in the collision event, and accurately determining the collision parameters, which is the basic information collection stage of the entire collision feedback process. Next, the first determination module 404 calculates and generates the target first vibration curve of the collision object and the target second vibration curve of the object being hit based on the previously collected collision parameters. These two curves respectively and delicately depict the subtle vibration changes of the two collision parties during the collision process. Subsequently, the second determination module 406 comprehensively considers the collision parameters, the target first vibration curve and the target second vibration curve to construct a collision feedback curve, which is a curve that highly summarizes the collision effect and comprehensively reflects all the dynamic characteristics of the collision event. Finally, the rendering module 408 transmits the collision feedback curve to the rendering end, which no longer needs to perform time-consuming and complex vibration effect calculations in the real-time scene, but directly calls the pre-calculated collision feedback curve for rendering operations. This process greatly simplifies the workload of the rendering end, accelerates the rendering speed, and ensures the accuracy and fluency of the collision visual effect, which ultimately brings about a significant improvement in rendering efficiency and a better user experience. Therefore, the entire system exhibits more excellent performance and responsiveness.
[0134] The above is a schematic scheme of a collision rendering device of this embodiment. It should be noted that the technical scheme of the collision rendering device and the technical scheme of the collision rendering method described above are of the same concept, and the details not described in detail in the technical scheme of the collision rendering device can be referred to the description of the technical scheme of the collision rendering method described above.
[0135] Figure 5 The block diagram of a computing device 500 provided according to an embodiment of the present invention is shown. The components of the computing device 500 include but are not limited to a memory 510 and a processor 520. The processor 520 is connected to the memory 510 via a bus 530, and the database 550 is used to store data.
[0136] The computing device 500 also includes an access device 540 that enables the computing device 500 to communicate via one or more networks 560. Examples of these networks include a public switched telephone network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or a combination of communication networks such as the Internet. The access device 540 may include one or more of any type of network interface, wired or wireless (e.g., a network interface card (NIC)), such as an IEEE 802.11 wireless local area network (WLAN) wireless interface, a World Wide Interoperability for Microwave Access (Wi-MAX) interface, an Ethernet interface, a Universal Serial Bus (USB) interface, a cellular network interface, a Bluetooth interface, and a Near Field Communication (NFC).
[0137] In one embodiment of the present invention, the above components of the computing device 500 and Figure 5 Other components not shown in the figure may also be connected to each other, for example, via a bus. It should be understood that Figure 5 The computing device structure block diagram shown is only for the purpose of illustration, and is not intended to limit the scope of the present invention. Those skilled in the art may add or replace other components as needed.
[0138] The computing device 500 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., a tablet computer, a personal digital assistant, a laptop computer, a notebook computer, a netbook, etc.), a mobile phone (e.g., a smart phone), a wearable computing device (e.g., a smart watch, smart glasses, etc.), or other types of mobile devices, or a stationary computing device such as a desktop computer or a personal computer (PC). The computing device 500 may also be a mobile or stationary server.
[0139] The processor 520 is used to execute the following computer program / instruction, which implements the steps of the above-mentioned collision rendering method when executed by the processor.
[0140] The various embodiments of the present invention are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the computing device embodiment, since it is basically similar to the collision rendering method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the collision rendering method embodiment.
[0141] An embodiment of the present invention further provides a computer-readable storage medium storing a computer program / instruction, which implements the steps of the above-mentioned collision rendering method when executed by a processor.
[0142] The various embodiments of the present invention are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the computer-readable storage medium embodiment, since it is basically similar to the collision rendering method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the collision rendering method embodiment.
[0143] An embodiment of the present invention further provides a computer program product, including a computer program / instruction, which implements the steps of the above-mentioned collision rendering method when executed by a processor.
[0144] The above is a schematic scheme of a computer program product of this embodiment. It should be noted that the technical scheme of the computer program product and the technical scheme of the collision rendering method described above are of the same concept, and the details not described in detail in the technical scheme of the computer program product can be found in the description of the technical scheme of the collision rendering method described above.
[0145] The above describes specific embodiments of the present invention. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0146] The computer instructions include computer program codes, which may be in source code form, object code form, executable files or some intermediate forms, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the computer-readable medium may be appropriately increased or decreased according to the requirements of patent practice. For example, in some regions, according to patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.
[0147] It should be noted that, for the convenience of description, the aforementioned method embodiments are all described as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present invention are not limited by the described action sequence, because according to the embodiments of the present invention, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the embodiments of the present invention.
[0148] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0149] The preferred embodiments of the present invention disclosed above are only used to help explain the present invention. The optional embodiments do not describe all the details in detail, nor do they limit the invention to the specific implementation methods described. Obviously, many modifications and changes can be made according to the content of the embodiments of the present invention. The present invention selects and specifically describes these embodiments in order to better explain the principles and practical applications of the embodiments of the present invention, so that those skilled in the art can understand and use the present invention well. The present invention is limited only by the claims and their full scope and equivalents.
Claims
1. A collision rendering method, It is characterized in that include: Acquire a collision object and a collision object that collide in a collision event, and determine collision parameters of the collision event; Based on the collision parameters, determining a target first vibration curve of the collision object and a target second vibration curve of the collided object, wherein the target first vibration curve is used to characterize the vibration change of the collision object in the collision event, and the target second vibration curve is used to characterize the vibration change of the collided object in the collision event; determining a collision feedback curve based on the collision parameter, the target first vibration curve, and the target second vibration curve; The collision feedback curve is synchronized to the rendering end to perform a rendering operation.
2. The method according to claim 1, It is characterized in that The obtaining of the collision object and the collision object in the collision event includes: When a collision event is detected, obtaining a first object identifier of a first object and a second object identifier of a second object that collided in the collision event; Acquire a first moving speed based on the first object identifier, and acquire a second moving speed based on the second object identifier; A collision object and a collision-affected object are determined in the first object and the second object based on the first moving speed and the second moving speed.
3. The method according to claim 1, It is characterized in that The collision parameters include collision speed and collision direction; the collision parameters for determining the collision event include: Acquire a third moving speed of the collision object and a fourth moving speed of the collision object; Determining a collision surface between the collision object and the collision object; determining the collision direction based on the third moving speed, the fourth moving speed and the collision surface; The collision speed is determined based on the third moving speed, the fourth moving speed, and the collision direction.
4. The method according to claim 1, It is characterized in that The step of determining a target first vibration curve of the collision object and a target second vibration curve of the collision object based on the collision parameter comprises: Determine a numerical interval hit by the collision parameter, and determine an interval identifier of the numerical interval; Based on the interval identifier, selecting a target first vibration curve corresponding to the interval identifier from candidate first vibration curves, wherein the candidate first vibration curve is used to characterize the vibration change of the collision object under the collision parameters in each preset value interval; Based on the interval identifier, a target second vibration curve corresponding to the interval identifier is screened from candidate second vibration curves, wherein the candidate second vibration curve is used to characterize the vibration change of the impacted object under the collision parameters in each preset value interval.
5. The method according to claim 4, It is characterized in that Before determining the numerical interval hit by the collision parameter and determining the interval identifier of the numerical interval, the method further includes: receiving interval identifiers of multiple numerical intervals for collision parameters sent by the front end; For any interval identifier, determining a test collision parameter corresponding to the any interval identifier; A candidate vibration curve corresponding to any interval identifier is calculated based on the test collision parameter and each scene object, wherein each scene object is an object in a target scene, and each scene object includes the collision object and the collided object.
6. The method according to claim 1, It is characterized in that The collision parameters include a time influence coefficient and an amplitude influence coefficient; the collision parameters for determining the collision event include: Based on the object identifier and the touched identifier of the touched object, obtaining a time influence coefficient corresponding to the touched identifier; Based on the object identifier and the collision identifier of the collision object, an amplitude influence coefficient corresponding to the collision identifier is obtained.
7. The method according to claim 6, It is characterized in that The horizontal axes of the target first vibration curve and the target second vibration curve represent the vibration time, the vertical axes of the target first vibration curve and the target second vibration curve represent the vibration amplitude, and the collision parameters include the collision direction, the time influence coefficient and the amplitude influence coefficient; The determining of the collision feedback curve based on the collision parameter, the target first vibration curve and the target second vibration curve includes: Adjusting the horizontal axes of the target first vibration curve and the target second vibration curve based on the time influence coefficient, and adjusting the vertical axes of the target first vibration curve and the target second vibration curve based on the amplitude influence coefficient, to obtain an updated first vibration curve and an updated second vibration curve; The updated first vibration curve and the updated second vibration curve are combined according to the collision direction to obtain a collision feedback curve.
8. The method according to claim 7, It is characterized in that The step of combining the updated first vibration curve and the updated second vibration curve according to the collision direction to obtain a collision feedback curve includes: Calculating the difference in amplitude at each time point between the updated first vibration curve and the updated second vibration curve to obtain an initial feedback curve; The component of the amplitude in the collision direction at a time point in the initial feedback curve is calculated to obtain a collision feedback curve.
9. The method according to claim 1, It is characterized in that The horizontal axis of the collision feedback curve represents the vibration time, and the vertical axis represents the vibration amplitude; synchronizing the collision feedback curve to the rendering end to perform the rendering operation includes: Determining an effect rendering time based on the vibration time, and determining an effect amplitude based on the vibration amplitude; Determining a collision effect based on the collision object and the collision object; The collision effect is rendered according to the effect rendering time and the effect amplitude.
10. A collision rendering device, It is characterized in that include: An acquisition module is configured to acquire a collision object and a collision object that collide in a collision event, and determine a collision parameter of the collision event; A first determination module is configured to determine a target first vibration curve of the collision object and a target second vibration curve of the collided object based on the collision parameter, wherein the target first vibration curve is used to characterize the vibration change of the collision object in the collision event, and the target second vibration curve is used to characterize the vibration change of the collided object in the collision event; A second determination module is configured to determine a collision feedback curve based on the collision parameter, the target first vibration curve and the target second vibration curve; The rendering module is configured to synchronize the collision feedback curve to the rendering end to perform a rendering operation.
11. A computing device, It is characterized in that include: Memory and processor; The memory is used to store computer programs / instructions, and the processor is used to execute the computer programs / instructions. When the computer programs / instructions are executed by the processor, the steps of the collision rendering method according to any one of claims 1 to 9 are implemented.
12. A computer-readable storage medium, It is characterized in that It stores a computer program / instruction, which, when executed by a processor, implements the steps of the collision rendering method described in any one of claims 1 to 9.
13. A computer program product, It is characterized in that The invention comprises a computer program / instruction, which, when executed by a processor, implements the steps of the collision rendering method according to any one of claims 1 to 9.
Citation Information
Cited By
Video synchronization curling training data acquisition method assisted by mobile terminal
CN122293810A
