Vibration description file making method and device, storage medium and computer equipment
By determining the vibration demand information and target easing curve, automatically calculate the vibration parameter description information, and generate the vibration description file, the problem of low efficiency in the production of vibration description file in the prior art is solved, and efficient and accurate vibration effect creation is achieved.
Patent Information
- Application Number
- CN202311586703.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-24
- Publication Date
- 2025-01-10
AI Technical Summary
In the prior art, developers need to handwritten code to create vibration description files, resulting in large workload and high time cost, making it difficult to improve the production efficiency of vibration description files and reduce production difficulty.
By determining the vibration demand information and the target easing curve, the corresponding vibration parameter description information is calculated, and the vibration description file is generated. The target easing curve is used to automatically calculate the vibration parameters, and the description file used to drive the vibration components is directly generated to avoid manual production.
It improves the efficiency of the vibration description file, reduces the difficulty of production, helps developers to accurately create ideal vibration effects, and feel the effect of vibration parameters changing over time through intuitive easing curves.
Smart Images

Figure CN119292655A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of electronic information technology, and in particular to a method and device for producing a vibration description file, a storage medium, and a computer device. Background Art
[0002] With the development of multimedia technology, users' demand for visual, auditory and tactile interactions is increasing. Vibration touch is an important means of realizing non-visual interaction on the terminal, and is mainly used in information reminders, tactile feedback and other aspects of the terminal. Terminal devices are usually equipped with motors, which drive the terminal device through the rotation of the motor rotor in the motor, thereby driving the terminal device to vibrate, generating vibration touch, and bringing a diversified interactive experience to users. For example, in racing games, the car starts with a slow speed and weak vibration, and then accelerates to a strong vibration. For example, in archery games, when the bow is drawn, the vibration intensity starts to increase quickly and then slows down.
[0003] In the prior art, technicians manually write codes to form vibration description files, and control the motor in the terminal through the vibration description files, which increases the workload and time cost of developers. Summary of the invention
[0004] In view of this, the embodiments of the present application provide a method and device for producing a vibration description file, a storage medium, and a computer device, which avoids the production personnel from manually producing the vibration description file, improves the production efficiency, and reduces the production difficulty.
[0005] According to one aspect of the present application, a method for preparing a vibration description file is provided, the method comprising:
[0006] Determining vibration requirement information and a target easing curve, wherein the vibration requirement information includes a target vibration duration;
[0007] Calculating vibration parameter description information corresponding to the vibration demand information using the target easing curve;
[0008] A vibration description file corresponding to the vibration requirement information is generated according to the vibration parameter description information.
[0009] Optionally, the target easing curve is a vibration parameter description curve per unit time length; and according to the target easing curve, calculating the vibration parameter description information corresponding to the vibration demand information includes:
[0010] Determining a target time length of the target easing curve based on the target vibration duration;
[0011] Determine the number of sampling points, and sample the target easing curve with the number of sampling points to obtain the number of sampling points, wherein the number of sampling points is any one of a preset number, a number determined based on a target time length and a preset sampling period, a number input by a received user, and a specified number carried in the vibration demand information;
[0012] The time information and vibration parameter description information corresponding to the sampling point are obtained on the target easing curve, and the vibration parameter description information corresponding to the vibration demand information is generated according to the time information and the vibration parameter description information.
[0013] Optionally, the vibration requirement information further includes a target number of cycles; and based on the target vibration duration, determining a target time length of the target easing curve includes:
[0014] The target number of cycles is used as the number of cycles of the target easing curve, the target easing curve is spliced with the target number of cycles, and the target time length of the spliced target easing curve is determined based on the target vibration duration;
[0015] Accordingly, sampling the target easing curve with the number of sampling points to obtain the number of sampling points includes:
[0016] Sampling is performed on the spliced target easing curve with the number of sampling points to obtain the number of sampling points.
[0017] Optionally, determining a target easing curve includes:
[0018] Based on a selection operation of any preset easing curve, determining the selected preset easing curve as the target easing curve; and / or,
[0019] In response to the curve drawing operation, the target easing curve is determined based on the drawn curve.
[0020] Optionally, the vibration requirement information further includes target game environment information; before determining the target easing curve, the method further includes:
[0021] Determining a recommended easing curve among the preset easing curves based on the target game environment information and the curve applicable game environment description information corresponding to the preset easing curve;
[0022] Generate and output the recommended information of the recommended easing curve.
[0023] Optionally, the method further comprises:
[0024] Acquire a preset animation curve, and analyze the change information of the animation action attribute corresponding to the preset animation curve over time, wherein the animation action attribute includes action direction and / or action amplitude;
[0025] Based on the information of the change of the animation action attribute over time, the information of the change of the vibration attribute over time is generated, and according to the information of the change of the vibration attribute over time, the preset easing curve is generated, wherein the vibration attribute includes amplitude and / or frequency.
[0026] Optionally, obtain a preset animation curve, including:
[0027] Get the animation clip file;
[0028] The preset animation curve is obtained in the animation clip file.
[0029] Optionally, after obtaining the preset animation curve, the method further includes:
[0030] Obtaining animation clip description information corresponding to the animation clip file, and generating curve applicable game environment description information corresponding to the preset animation curve according to the animation clip description information or description modification information based on the animation clip description information; and / or,
[0031] Based on the description editing information of the preset animation curve, curve applicable game environment description information corresponding to the preset animation curve is generated.
[0032] Optionally, after generating a vibration description file corresponding to the vibration requirement information according to the vibration parameter description information, the method further includes:
[0033] A target animation clip file corresponding to the target easing curve is determined, and the vibration description file is associated with the target animation clip file and stored.
[0034] Optionally, before associating and storing the vibration description file with the target animation clip file, the method further includes:
[0035] In response to a verification instruction for the vibration description file, the vibration description file and the associated target animation clip file are sent to a preset verification terminal, so as to drive a vibration component in the preset verification terminal to vibrate based on the vibration description file and play an animation clip based on the target animation clip file;
[0036] In case of receiving a confirmation signal for the vibration description file, executing a step of associating and storing the vibration description file with the target animation clip file;
[0037] When a modification signal of the vibration description file is received, the vibration requirement information and the target easing curve are re-determined.
[0038] According to another aspect of the present application, a device for preparing a vibration description file is provided, the device comprising:
[0039] A curve determination module, used to determine vibration requirement information and a target easing curve, wherein the vibration requirement information includes a target vibration duration;
[0040] An information calculation module, used to calculate vibration parameter description information corresponding to the vibration demand information using the target easing curve;
[0041] The file generating module is used to generate a vibration description file corresponding to the vibration requirement information according to the vibration parameter description information.
[0042] Optionally, the target easing curve is a vibration parameter description curve per unit time length; and the information calculation module is further used to:
[0043] Determining a target time length of the target easing curve based on the target vibration duration;
[0044] Determine the number of sampling points, and sample the target easing curve with the number of sampling points to obtain the number of sampling points, wherein the number of sampling points is any one of a preset number, a number determined based on a target time length and a preset sampling period, a number input by a received user, and a specified number carried in the vibration demand information;
[0045] The time information and vibration parameter description information corresponding to the sampling point are obtained on the target easing curve, and the vibration parameter description information corresponding to the vibration demand information is generated according to the time information and the vibration parameter description information.
[0046] Optionally, the vibration requirement information also includes a target number of cycles;
[0047] The information calculation module is also used for:
[0048] The target number of cycles is used as the number of cycles of the target easing curve, the target easing curve is spliced with the target number of cycles, and the target time length of the spliced target easing curve is determined based on the target vibration duration;
[0049] Sampling is performed on the spliced target easing curve with the number of sampling points to obtain the number of sampling points.
[0050] Optionally, the curve determination module is further used to:
[0051] Based on a selection operation of any preset easing curve, determining the selected preset easing curve as the target easing curve; and / or,
[0052] In response to the curve drawing operation, the target easing curve is determined based on the drawn curve.
[0053] Optionally, the vibration requirement information also includes target game environment information;
[0054] The curve determination module is used to:
[0055] Determining a recommended easing curve among the preset easing curves based on the target game environment information and the curve applicable game environment description information corresponding to the preset easing curve;
[0056] Generate and output the recommended information of the recommended easing curve.
[0057] Optionally, the device further comprises: an easing curve generating module, configured to:
[0058] Acquire a preset animation curve, and analyze the change information of the animation action attribute corresponding to the preset animation curve over time, wherein the animation action attribute includes action direction and / or action amplitude;
[0059] Based on the information of the change of the animation action attribute over time, the information of the change of the vibration attribute over time is generated, and according to the information of the change of the vibration attribute over time, the preset easing curve is generated, wherein the vibration attribute includes amplitude and / or frequency.
[0060] Optionally, the easing curve generating module is further used for:
[0061] Get the animation clip file;
[0062] The preset animation curve is obtained in the animation clip file.
[0063] Optionally, the easing curve generating module is further used for:
[0064] After obtaining the preset animation curve, obtaining the animation clip description information corresponding to the animation clip file, and generating the curve applicable game environment description information corresponding to the preset animation curve according to the animation clip description information or the description modification information based on the animation clip description information; and / or,
[0065] Based on the description editing information of the preset animation curve, curve applicable game environment description information corresponding to the preset animation curve is generated.
[0066] Optionally, the file generation module is further used to:
[0067] After generating a vibration description file corresponding to the vibration requirement information according to the vibration parameter description information, a target animation clip file corresponding to the target easing curve is determined, and the vibration description file is associated with the target animation clip file and stored.
[0068] Optionally, the file generation module is further used to:
[0069] Before the vibration description file is stored in association with the target animation clip file, in response to a verification instruction for the vibration description file, the vibration description file and the associated target animation clip file are sent to a preset verification terminal, so as to drive a vibration component in the preset verification terminal to vibrate based on the vibration description file and play an animation clip based on the target animation clip file;
[0070] In case of receiving a confirmation signal for the vibration description file, executing a step of associating and storing the vibration description file with the target animation clip file;
[0071] When a modification signal of the vibration description file is received, the vibration requirement information and the target easing curve are re-determined.
[0072] According to another aspect of the present application, a storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, the method for producing the vibration description file is implemented.
[0073] According to another aspect of the present application, a computer device is provided, including a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, wherein the processor implements the above-mentioned method for producing a vibration description file when executing the program.
[0074] By means of the above technical scheme, a method and device for making a vibration description file, a storage medium, and a computer device provided in an embodiment of the present application determine a target easing curve specified by a production staff and vibration requirement information including at least a target vibration duration, thereby automatically calculating vibration parameter description information matching the vibration requirement information using the target easing curve, and generating a vibration description file for driving the vibration component to work. The embodiment of the present application directly uses the specified target easing curve and vibration requirement information to complete the production of the vibration description file, avoiding the production staff from manually making the vibration description file, improving the production efficiency, reducing the production difficulty, and the production staff can intuitively and concretely feel the effect of the vibration parameters changing over time by observing the target easing curve, which helps the production staff to accurately make the required vibration description file to obtain the ideal vibration effect.
[0075] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0076] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0077] Figure 1 A schematic diagram showing a flow chart of a method for preparing a vibration description file provided in an embodiment of the present application;
[0078] Figure 2 A schematic flow chart of another method for preparing a vibration description file provided in an embodiment of the present application is shown;
[0079] Figure 3 A schematic flow chart of another method for preparing a vibration description file provided in an embodiment of the present application is shown;
[0080] Figure 4 A schematic diagram of the structure of a vibration description file production device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0081] The present application will be described in detail below with reference to the accompanying drawings and in combination with embodiments. It should be noted that the embodiments and features in the embodiments of the present application can be combined with each other without conflict.
[0082] Easing curves are often used to express the relationship between the degree of animation change and time, and are often used to simulate some common actions in the physical world.
[0083] In this embodiment, a method for preparing a vibration description file is provided. Specifically, the vibration description file can be prepared by using an easing curve, such as Figure 1 As shown, the method includes:
[0084] Step 101 : determining vibration requirement information and a target easing curve, wherein the vibration requirement information includes a target vibration duration.
[0085] In the embodiment of the present application, when making a vibration description file, the target easing curve determined by the production personnel can be used, the target vibration duration is set as the total vibration duration of the vibration description file, and the vibration parameter information corresponding to each time point within the target vibration duration is calculated, thereby generating a vibration description file. The vibration parameter information can specifically include the frequency and amplitude of the vibration, so as to control the change of the vibration frequency and amplitude over time to achieve the desired vibration effect.
[0086] In an embodiment of the present application, optionally, determining a target easing curve includes: based on a selection operation of any preset easing curve, determining a selected preset easing curve as the target easing curve; and / or, in response to a curve drawing operation, determining the target easing curve based on a drawn curve.
[0087] In this embodiment, the production personnel can select any one of the existing preset easing curves as the target easing curve, or draw an easing curve themselves as the target easing curve.
[0088] In an embodiment of the present application, optionally, the vibration requirement information also includes target game environment information; before determining the target easing curve, the method also includes: determining a recommended easing curve in the preset easing curve based on the target game environment information and the curve applicable game environment description information corresponding to the preset easing curve; generating and outputting recommendation information of the recommended easing curve.
[0089] In this embodiment, in order to reduce the time for the production staff to select from the preset easing curves, improve the production efficiency of the vibration description file, and provide reference for the production staff, the curve applicable game environment description information corresponding to each preset easing curve can be pre-configured, and the game environment applicable to the curve can be described through this information, for example, a certain curve is applicable to the vibration effect of making a bow and arrow, and a certain curve is applicable to the vibration effect of the elastic object landing rebound process. When the production staff inputs the vibration demand information, in addition to inputting the target vibration duration, they can also input the target game environment information, so that according to the target game environment information input by the production staff and the curve applicable game environment description information of each preset easing curve, the preset easing curve can be automatically matched. If the target game environment information is similar to the description information of the applicable game environment of a certain curve, the preset easing curve corresponding to this description information can be used as a recommended easing curve, and the recommended information about the recommended easing curve is generated and output to provide reference for the production staff. The production staff can directly determine the recommended easing curve as the target easing curve, or they can also select other preset easing curves or draw new easing curves as the target easing curve. By recommending the easing curve, even unskilled developers can create vibration description files according to the recommended curve. This method can provide a template for vibration description file production, so that different developers can create vibration description files with a unified style according to the recommended curve, so that when multiple developers create vibration description files for a game, they can ensure a unified game style.
[0090] Step 102: Calculate vibration parameter description information corresponding to the vibration demand information using the target easing curve.
[0091] In an embodiment of the present application, after determining the vibration requirement information and the target easing curve, the automatic calculation step of the vibration description information can be entered, and the vibration parameter description information matching the vibration requirement information can be calculated using the target easing curve, such as calculating the change information of the vibration amplitude over time and the change information of the vibration frequency over time.
[0092] In an embodiment of the present application, optionally, the target easing curve is a vibration parameter description curve per unit time length; step 102 includes: determining a target time length of the target easing curve based on the target vibration duration; determining the number of sampling points, and sampling the target easing curve with the number of sampling points to obtain sampling points of the number of sampling points, wherein the number of sampling points is any one of a preset number, a number determined based on a target time length and a preset sampling period, a received user input number, and a specified number carried in the vibration requirement information; obtaining time information and vibration parameter description information corresponding to the sampling points on the target easing curve, and generating vibration parameter description information corresponding to the vibration requirement information based on the time information and the vibration parameter description information.
[0093] In this embodiment, the target slow-motion curve describes the vibration parameter description curve per unit time length, such as the change of vibration parameters over time within 1 second. When calculating the vibration parameter description information, the time length of the target slow-motion curve can be scaled to the target vibration duration. For example, if the target vibration duration is 2 seconds, the time coordinate value of the horizontal axis in the target slow-motion curve can be doubled, and the vertical axis remains unchanged. Then determine the number of sampling points, where the number of sampling points can be a fixed preset number, a number entered by the production staff, or a fixed preset sampling period (or a sampling period specified by the production staff) combined with the target time length. It can also be the number specified by the production staff when inputting the vibration demand information. Thus, according to the number of sampling points, uniform sampling is performed on the target slow-motion curve to determine multiple sampling point information, the sampling point information includes the time information of the horizontal axis and the vibration parameter description information of the vertical axis, and finally the vibration parameter description information is generated using the sampling point information.
[0094] Further, optionally, the vibration demand information also includes a target number of cycles; based on the target vibration duration, the target time length of the target easing curve is determined, including: taking the target number of cycles as the number of cycles of the target easing curve, splicing the target easing curve with the number of cycles, and determining the target time length of the spliced target easing curve based on the target vibration duration; accordingly, sampling the target easing curve with the number of sampling points to obtain the sampling points of the number of sampling points, including: sampling the target easing curve with the number of sampling points after splicing to obtain the sampling points of the number of sampling points.
[0095] The vibration requirement information may also include the target number of cycles, which is used to indicate the number of repetitions of the target easing curve. If the target number of cycles is not 1, the target easing curve should be spliced according to the target number of cycles, and then the spliced target easing curve should be used for calculation. For example, if the target vibration duration is 1 second and the target number of cycles is 2, it means that a vibration description file with a total time length of 1 second is generated, in which the selected target easing curve is cycled twice, that is, the duration corresponding to 1 curve is 0.5 seconds.
[0096] In addition, the production staff can also select multiple target easing curves and set the order of each curve. When calculating the vibration parameter description information, the curves are first spliced in order, and then the target time length of the spliced curves is determined for sampling.
[0097] Step 103: Generate a vibration description file corresponding to the vibration requirement information according to the vibration parameter description information.
[0098] In an embodiment of the present application, after the vibration parameter description information is determined, the vibration parameter description information can be used to generate a vibration description file that can drive the vibration component to work, such as a .haptic file, so as to drive the vibration component to vibrate according to the information on the change of vibration parameters over time indicated in the vibration parameter description information, thereby achieving the desired vibration effect and realizing a customized vibration solution.
[0099] By applying the technical solution of this embodiment, the target easing curve specified by the production personnel and the vibration requirement information including at least the target vibration duration are determined, so as to automatically calculate the vibration parameter description information matching the vibration requirement information using the target easing curve, and generate a vibration description file for driving the vibration component to work. The embodiment of the present application can directly use the specified target easing curve and vibration requirement information to complete the production of the vibration description file, avoiding the production personnel from manually producing the vibration description file, improving the production efficiency, reducing the production difficulty, and the production personnel can intuitively and concretely feel the effect of the vibration parameters changing over time by observing the target easing curve, which helps the production personnel to accurately produce the required vibration description file to obtain the ideal vibration effect.
[0100] Furthermore, the embodiment of the present application may also provide a vibration description file creation tool, and the user may use the tool to create a vibration description file, wherein the target easing curve may be determined by running the tool to perform the following steps, including:
[0101] Displaying an easing curve selection interface, wherein the easing curve selection interface includes a plurality of preset easing curves and a curve drawing control;
[0102] Based on a selection operation of any preset easing curve, the selected preset easing curve is determined as the target easing curve; and / or, in response to a triggering operation of the curve drawing control, an easing curve drawing interface is displayed, and the target easing curve is determined based on the curve drawn in the curve drawing interface.
[0103] In the above embodiment, the production staff can specify the target easing curve in the easing curve selection interface, and multiple preset easing curves and curve drawing controls can be displayed in the interface. The production staff can directly select the preset easing curve as the target easing curve, or can trigger the curve drawing control in the interface to open the easing curve drawing interface and draw the curve, and use the drawn curve as the target easing curve. In addition, the drawn curve can also be saved as a new preset easing curve.
[0104] In the embodiment of the present application, optionally, the vibration requirement information can be determined by running the tool to perform the following steps, including:
[0105] Displaying a vibration requirement information configuration interface, wherein the vibration requirement information input interface includes a vibration duration input control, a cycle number input control, and an application game environment input control, wherein the vibration duration input control and the cycle number input control are both required items and are pre-configured with respective default values;
[0106] The vibration requirement information is determined based on a configuration operation on the vibration requirement information configuration interface.
[0107] In the above embodiment, the production staff can input the vibration requirement configuration information in the vibration requirement information configuration interface, which includes a vibration duration input control of a required type, a number of loops input control of a required type, and an application game environment input control of an optional type, wherein the vibration duration input control and the number of loops input control are pre-configured with their own default values, and the production staff can modify or directly confirm the default value as the vibration requirement information.
[0108] In the embodiment of the present application, optionally, the easing curve selection interface is used to directly display the curve applicable game environment description information corresponding to the preset easing curve, or display the curve applicable game environment description information corresponding to the triggered preset easing curve based on the triggering operation of any preset easing curve; before displaying the easing curve selection interface, it may also include:
[0109] If target game environment information input based on the applied game environment input control is received, a recommended easing curve in the preset easing curve is determined based on the target game environment information and the curve applicable game environment description information corresponding to the preset easing curve, the easing curve selection interface is displayed, and a recommended mark is added to the recommended easing curve displayed in the easing curve selection interface;
[0110] If a trigger operation on the free selection curve control is received, the easing curve selection interface is displayed.
[0111] In the above embodiment, the production staff configures the target game environment information by applying the game environment input control, and can also use the game environment description information according to the target game environment information and the curves corresponding to each preset easing curve to determine the recommended easing curve among the preset easing curves, thereby displaying a recommended mark on the recommended easing curve when displaying the easing curve selection interface.
[0112] Further, as a refinement and extension of the specific implementation of the above embodiment, in order to fully illustrate the specific implementation process of this embodiment, another method for preparing a vibration description file is provided, such as Figure 2 As shown, the method includes:
[0113] Step 201, obtaining an animation clip file, obtaining a preset animation curve in the animation clip file, and parsing information on changes in animation action attributes corresponding to the preset animation curve over time, wherein the animation action attributes include action direction and / or action amplitude.
[0114] In an embodiment of the present application, a preset easing curve can be generated using a preset animation curve. The preset animation curve can specifically come from an animation clip file Animation Clip. The most basic Animation Clip can be regarded as the smallest unit in the animation system. The running, jumping, attacking, and falling of a character in the game can all be represented by a complete AnimationClip. These animation clip files can be original resources created in advance, or external resources can be imported. Animation clip files are usually packaged with game models. For example, a file in FBX format may include a character model, corresponding animation clips, and skeletons. In Animation Clip, any animatable attribute can have an animation curve, which means that the change of the attribute over time can be controlled, that is, the change of the direction of movement and / or the amplitude of movement over time. In curve mode, changes in attribute values are visualized as lines on a graph.
[0115] Step 202, based on the information about the change of the animation action attribute over time, generate the information about the change of the vibration attribute over time, and generate the preset easing curve according to the information about the change of the vibration attribute over time, wherein the vibration attribute includes amplitude and / or frequency.
[0116] In the embodiment of the present application, the information of the change of the animation action attribute represented by the preset animation curve over time can be converted into the information of the change of the vibration attribute over time, so as to generate an easing curve. For example, a vibration curve is generated according to the attribute curve in an existing animation clip file. The animation attribute curve reflects the change of the direction and amplitude of an action over time. The change of the vibration amplitude and frequency and other attributes over time can be set according to this curve.
[0117] In an embodiment of the present application, optionally, after obtaining the preset animation curve, it can also include: obtaining the animation clip description information corresponding to the animation clip file, and generating the curve applicable game environment description information corresponding to the preset animation curve according to the animation clip description information or the description modification information based on the animation clip description information; and / or, generating the curve applicable game environment description information corresponding to the preset animation curve based on the description editing information of the preset animation curve.
[0118] In this embodiment, when the animation curve in the animation clip file is used to produce the easing curve, the animation clip description information corresponding to the animation clip file can also be obtained. For example, the animation clip description information can be the naming information of the animation clip file, the description information input by the user, etc., so as to directly use the animation clip description information or the modified animation clip description information to generate the curve applicable game environment description information of the preset animation curve, and use it as the curve applicable game environment description information of the preset easing curve corresponding to the preset animation curve. Of course, the production staff can also directly edit the description information about the preset animation curve by themselves without referring to the animation clip description information, so as to generate the curve applicable game environment description information.
[0119] Step 203: Determine vibration requirement information, wherein the vibration requirement information includes a target vibration duration.
[0120] In the embodiment of the present application, the vibration requirement information includes the target vibration duration, the target number of cycles, and may also include the target game environment information in order to recommend the easing curve.
[0121] Step 204, based on the selection operation of any preset easing curve, determining the selected preset easing curve as the target easing curve; and / or, in response to the curve drawing operation, determining the target easing curve and the target easing curve based on the drawn curve.
[0122] In the embodiment of the present application, the production personnel can directly select from the preset easing curves, or draw the easing curve by themselves to determine the target easing curve.
[0123] Step 205: Calculate vibration parameter description information corresponding to the vibration demand information using the target easing curve.
[0124] In the embodiment of the present application, after the vibration requirement information and the target easing curve are determined, the target easing curve can be used to automatically calculate vibration parameter description information matching the vibration requirement information, such as the change information of vibration frequency and vibration amplitude over time.
[0125] Step 206: Generate a vibration description file corresponding to the vibration requirement information according to the vibration parameter description information; determine a target animation clip file corresponding to the target easing curve, and associate and store the vibration description file with the target animation clip file.
[0126] In the embodiment of the present application, the preset easing curve generated by the preset animation curve in the target animation clip can be used as a general preset easing curve to provide a basis for making any vibration description file; it can also be used as a special easing curve for the target animation clip, which is specifically used to generate the vibration description file required by the target animation clip. Further, after the vibration description file that can drive the vibration component to work is generated by using the vibration parameter description information, only the vibration description file can be saved. In addition, the vibration description file can also be associated with the target animation clip and stored. The vibration description file is used to drive the vibration component to work when playing the target animation clip. Since the vibration description file is generated by using the preset easing curve corresponding to the animation curve in the target animation clip, it can ensure that the vibration effect provided by the vibration description file is more matched with the target animation clip, and the comprehensive effect is better. And in this case, as long as the production staff produces the animation curve, the vibration description file can be directly generated using the animation curve, and the production of the game file is also more convenient. Specifically, in this case, the production staff does not need to specify the vibration demand information, and directly uses the time length of the animation curve as the time length of the easing curve, so that the animation curve can be perfectly matched with the vibration description file.
[0127] In an alternative embodiment, Figure 3 As shown, the vibration description file can be created and stored in the following ways:
[0128] Step 301, obtaining an animation clip file; obtaining a preset animation curve from the animation clip file; parsing information on changes in animation action attributes corresponding to the preset animation curve over time, wherein the animation action attributes include action direction and / or action amplitude;
[0129] Step 302, based on the information about the change of the animation action attribute over time, generating information about the change of the vibration attribute over time, and generating a target easing curve according to the information about the change of the vibration attribute over time, wherein the vibration attribute includes amplitude and / or frequency;
[0130] Step 303, parsing the animation segment time length corresponding to the preset animation curve, setting the animation segment time length as the time length of the target easing curve, and calculating the vibration parameter description information using the target easing curve;
[0131] Step 304: Generate a vibration description file corresponding to the target animation clip according to the vibration parameter description information, and associate the vibration description file with the target animation clip and store them.
[0132] In the embodiment of the present application, optionally, before the vibration description file is stored in association with the target animation clip file, the following steps may also be included:
[0133] In response to a verification instruction for the vibration description file, the vibration description file and the associated target animation clip file are sent to a preset verification terminal, so as to drive a vibration component in the preset verification terminal to vibrate based on the vibration description file and play an animation clip based on the target animation clip file;
[0134] In case of receiving a confirmation signal for the vibration description file, executing a step of associating and storing the vibration description file with the target animation clip file;
[0135] When a modification signal of the vibration description file is received, the vibration requirement information and the target easing curve are re-determined.
[0136] In the above embodiment, in order to ensure that the vibration description file meets the needs of the production personnel, after the vibration description file is produced, the vibration description file can also be sent to a preset verification terminal for verification. Specifically, only the vibration description file can be sent to the preset verification terminal, or the vibration description file and the associated target animation clip can be sent to the preset verification terminal together. After the production personnel verify the vibration effect of the vibration description file at the preset verification terminal and are satisfied, the vibration description file and the target animation clip are associated and stored. Otherwise, the vibration demand information and the target easing curve can be re-determined to regenerate the vibration description file.
[0137] Further, as Figure 1 The specific implementation of the method, the embodiment of the present application provides a device for making a vibration description file, such as Figure 4 As shown, the device comprises:
[0138] A curve determination module, used to determine vibration requirement information and a target easing curve, wherein the vibration requirement information includes a target vibration duration;
[0139] An information calculation module, used to calculate vibration parameter description information corresponding to the vibration demand information using the target easing curve;
[0140] The file generating module is used to generate a vibration description file corresponding to the vibration requirement information according to the vibration parameter description information.
[0141] Optionally, the target easing curve is a vibration parameter description curve per unit time length; and the information calculation module is further used to:
[0142] Determining a target time length of the target easing curve based on the target vibration duration;
[0143] Determine the number of sampling points, and sample the target easing curve with the number of sampling points to obtain the number of sampling points, wherein the number of sampling points is any one of a preset number, a number determined based on a target time length and a preset sampling period, a number input by a received user, and a specified number carried in the vibration demand information;
[0144] The time information and vibration parameter description information corresponding to the sampling point are obtained on the target easing curve, and the vibration parameter description information corresponding to the vibration demand information is generated according to the time information and the vibration parameter description information.
[0145] Optionally, the vibration requirement information also includes a target number of cycles;
[0146] The information calculation module is also used for:
[0147] The target number of cycles is used as the number of cycles of the target easing curve, the target easing curve is spliced with the target number of cycles, and the target time length of the spliced target easing curve is determined based on the target vibration duration;
[0148] Sampling is performed on the spliced target easing curve with the number of sampling points to obtain the number of sampling points.
[0149] Optionally, the curve determination module is further used to:
[0150] Based on a selection operation of any preset easing curve, determining the selected preset easing curve as the target easing curve; and / or,
[0151] In response to the curve drawing operation, the target easing curve is determined based on the drawn curve.
[0152] Optionally, the vibration requirement information also includes target game environment information;
[0153] The curve determination module is used to:
[0154] Determining a recommended easing curve among the preset easing curves based on the target game environment information and the curve applicable game environment description information corresponding to the preset easing curve;
[0155] Generate and output the recommended information of the recommended easing curve.
[0156] Optionally, the device further comprises: an easing curve generating module, configured to:
[0157] Acquire a preset animation curve, and analyze the change information of the animation action attribute corresponding to the preset animation curve over time, wherein the animation action attribute includes action direction and / or action amplitude;
[0158] Based on the information of the change of the animation action attribute over time, the information of the change of the vibration attribute over time is generated, and according to the information of the change of the vibration attribute over time, the preset easing curve is generated, wherein the vibration attribute includes amplitude and / or frequency.
[0159] Optionally, the easing curve generating module is further used for:
[0160] Get the animation clip file;
[0161] The preset animation curve is obtained in the animation clip file.
[0162] Optionally, the easing curve generating module is further used for:
[0163] After obtaining the preset animation curve, obtaining the animation clip description information corresponding to the animation clip file, and generating the curve applicable game environment description information corresponding to the preset animation curve according to the animation clip description information or the description modification information based on the animation clip description information; and / or,
[0164] Based on the description editing information of the preset animation curve, curve applicable game environment description information corresponding to the preset animation curve is generated.
[0165] Optionally, the file generation module is further used to:
[0166] After generating a vibration description file corresponding to the vibration requirement information according to the vibration parameter description information, a target animation clip file corresponding to the target easing curve is determined, and the vibration description file is associated with the target animation clip file and stored.
[0167] Optionally, the file generation module is further used to:
[0168] Before the vibration description file is stored in association with the target animation clip file, in response to a verification instruction for the vibration description file, the vibration description file and the associated target animation clip file are sent to a preset verification terminal, so as to drive a vibration component in the preset verification terminal to vibrate based on the vibration description file and play an animation clip based on the target animation clip file;
[0169] In case of receiving a confirmation signal for the vibration description file, executing a step of associating and storing the vibration description file with the target animation clip file;
[0170] When a modification signal of the vibration description file is received, the vibration requirement information and the target easing curve are re-determined.
[0171] It should be noted that for other corresponding descriptions of the functional units involved in the vibration description file creation device provided in the embodiment of the present application, reference can be made to Figures 1 to 3 The corresponding description in the method will not be repeated here.
[0172] The embodiment of the present application also provides a computer device, which can be a personal computer, a server, a network device, etc. The computer device includes a bus, a processor, a memory and a communication interface, and can also include an input and output interface and a display device. 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 to store location information. The network 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, the steps in each method embodiment are implemented. It can be understood by those skilled in the art that the structure of the above-mentioned computer device is only a partial structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. The specific computer device may include more or fewer components, or combine certain components, or have different component arrangements.
[0173] In one embodiment, a computer-readable storage medium is provided. The computer-readable storage medium may be non-volatile or volatile, and stores a computer program thereon. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0174] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0175] 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 this application are all information and data authorized by the user or fully authorized by all parties.
[0176] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and 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-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0177] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, 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, they should be considered to be within the scope of this specification.
[0178] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be construed as limiting the scope of the present application. It should be noted that, for a person of ordinary skill in the art, several modifications and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A method for preparing a vibration description file, characterized in that: The method comprises: Determining vibration requirement information and a target easing curve, wherein the vibration requirement information includes a target vibration duration; Calculating vibration parameter description information corresponding to the vibration demand information using the target easing curve; A vibration description file corresponding to the vibration requirement information is generated according to the vibration parameter description information.
2. The method according to claim 1, characterized in that The target easing curve is a vibration parameter description curve per unit time length; and according to the target easing curve, the vibration parameter description information corresponding to the vibration demand information is calculated, including: Determining a target time length of the target easing curve based on the target vibration duration; Determine the number of sampling points, and sample the target easing curve with the number of sampling points to obtain the number of sampling points, wherein the number of sampling points is any one of a preset number, a number determined based on a target time length and a preset sampling period, a number input by a received user, and a specified number carried in the vibration demand information; The time information and vibration parameter description information corresponding to the sampling point are obtained on the target easing curve, and the vibration parameter description information corresponding to the vibration demand information is generated according to the time information and the vibration parameter description information.
3. The method according to claim 2, characterized in that The vibration requirement information also includes a target number of cycles; based on the target vibration duration, determining a target time length of the target easing curve includes: The target number of cycles is used as the number of cycles of the target easing curve, the target easing curve is spliced with the target number of cycles, and the target time length of the spliced target easing curve is determined based on the target vibration duration; Accordingly, sampling the target easing curve with the number of sampling points to obtain the number of sampling points includes: Sampling is performed on the spliced target easing curve with the number of sampling points to obtain sampling points with the number of sampling points.
4. The method according to any one of claims 1 to 3, characterized in that Determine the target easing curve, including: Based on a selection operation of any preset easing curve, determining the selected preset easing curve as the target easing curve; and / or, In response to the curve drawing operation, the target easing curve is determined based on the drawn curve.
5. The method according to claim 4, characterized in that The vibration requirement information also includes target game environment information; Before determining the target easing curve, the method further includes: Determining a recommended easing curve among the preset easing curves based on the target game environment information and the curve applicable game environment description information corresponding to the preset easing curve; Generate and output the recommended easing curve recommendation information.
6. The method according to claim 4, characterized in that The method further comprises: Acquire a preset animation curve, and analyze the change information of the animation action attribute corresponding to the preset animation curve over time, wherein the animation action attribute includes action direction and / or action amplitude; Based on the information of the change of the animation action attribute over time, the information of the change of the vibration attribute over time is generated, and according to the information of the change of the vibration attribute over time, the preset easing curve is generated, wherein the vibration attribute includes amplitude and / or frequency.
7. The method according to claim 6, characterized in that Get preset animation curves, including: Get the animation clip file; The preset animation curve is obtained in the animation clip file.
8. The method according to claim 7, characterized in that After obtaining the preset animation curve, the method further includes: Obtaining animation clip description information corresponding to the animation clip file, and generating curve applicable game environment description information corresponding to the preset animation curve according to the animation clip description information or description modification information based on the animation clip description information; and / or, Based on the description editing information of the preset animation curve, curve applicable game environment description information corresponding to the preset animation curve is generated.
9. The method according to claim 7, characterized in that: After generating a vibration description file corresponding to the vibration requirement information according to the vibration parameter description information, the method further includes: A target animation clip file corresponding to the target easing curve is determined, and the vibration description file is associated with the target animation clip file and stored.
10. The method according to claim 9, characterized in that Before associating and storing the vibration description file with the target animation clip file, the method further includes: In response to a verification instruction for the vibration description file, the vibration description file and the associated target animation clip file are sent to a preset verification terminal, so as to drive a vibration component in the preset verification terminal to vibrate based on the vibration description file and play an animation clip based on the target animation clip file; In case of receiving a confirmation signal for the vibration description file, executing a step of associating and storing the vibration description file with the target animation clip file; When a modification signal of the vibration description file is received, the vibration requirement information and the target easing curve are re-determined.
11. A device for producing a vibration description file, characterized in that: The device comprises: A curve determination module, used to determine vibration requirement information and a target easing curve, wherein the vibration requirement information includes a target vibration duration; An information calculation module, used to calculate vibration parameter description information corresponding to the vibration demand information using the target easing curve; The file generating module is used to generate a vibration description file corresponding to the vibration requirement information according to the vibration parameter description information.
12. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 10 is implemented.
13. A computer device comprising a storage medium, a processor, and a computer program stored in the storage medium and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 10 is implemented.