Method and device for synthesizing footstep sound effects in game scenes, and electronic equipment

By adjusting the volume and low-pass cutoff frequency of the first and second footsteps according to the amount of rain in the game scene, the problem of insufficient realism of footsteps on rainy days is solved, and a more realistic gaming experience is achieved.

CN114247142BActive Publication Date: 2025-09-12SHANGHAI PERFECT WORLD SOFTWARE CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202111580304.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-22
Publication Date
2025-09-12
Estimated Expiration
2041-12-22

AI Technical Summary

Technical Problem

In the prior art, the sound of footsteps on a rainy day in a game scene has a poor sense of realism. The prior art solutions usually control the footstep sound effects through a simple switch or real-time parameters, resulting in a lack of realism.

Method used

Get the current rainfall in the game scene, and when the rainfall exceeds the preset value, add a second footstep sound to the scene. Adjust the volume of the first and second footstep sounds so that they are negatively correlated, synthesizing a footstep sound effect that is more in line with the real world.

Benefits of technology

By adjusting the volume and low-pass cutoff frequency, the superposition effect of footsteps in the game scene is enhanced, the auditory realism on rainy days is improved, and the gaming experience is enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114247142B_ABST
    Figure CN114247142B_ABST
Patent Text Reader

Abstract

The present application provides a method and device for synthesizing footstep sound effects in a game scene, and an electronic device, wherein the method comprises: obtaining the current rainfall in the game scene, wherein the game scene includes a footstep sound effect of a first footstep, wherein the first footstep refers to a footstep produced in a non-raining scene; when the current rainfall exceeds a preset rainfall value, adding a second footstep to the game scene, wherein the second footstep refers to a footstep produced in a raining scene; adjusting the volume of the first footstep and the volume of the second footstep based on the current rainfall, wherein the volume of the first footstep is negatively correlated with the volume of the second footstep; and synthesizing the first footstep after the adjusted volume and the second footstep after the adjusted volume into the footstep sound effect in the game scene. This application solves the problem in the prior art of poor sound realism of footsteps in rainy days in game scenes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a method and device for synthesizing footstep sound effects in a game scene, and an electronic device. Background Art

[0002] With the development of the gaming industry, players' requirements for sound are becoming increasingly higher. The real-time sound feedback of characters' footsteps in complex exploration scenes is becoming increasingly important. However, current games pay relatively little attention to sound effects. Many use a design method that uses music to fill the entire scene, resulting in the footstep sound effects often being inaudible. Therefore, most games also have relatively simple footstep designs. For example, existing technical solutions use a simple switch to associate the floor material to control the playback of the sound corresponding to the current floor material, or only use Real-time Parameter Controls (RTPCs) to control the volume and high and low pass values ​​of the footstep sound effects of the current floor material. However, either method will make the footsteps in the game scene on rainy days less realistic. Summary of the Invention

[0003] The purpose of the embodiments of the present application is to provide a method and device for synthesizing footstep sound effects in a game scene, and an electronic device to solve the problem in the prior art that footstep sounds in a game scene on a rainy day have a poor sense of realism. The technical solutions of the embodiments of the present application are as follows:

[0004] In a first aspect of the implementation of the present application, a method for synthesizing footstep sound effects in a game scene is first provided, comprising: obtaining a current rainfall in the game scene, wherein the game scene includes a footstep sound effect of a first footstep, and the first footstep refers to a footstep produced in a non-raining scene; when the current rainfall exceeds a preset rainfall value, adding a second footstep to the game scene, wherein the second footstep refers to a footstep produced in a raining scene; adjusting the volume of the first footstep and the volume of the second footstep based on the current rainfall, wherein the volume of the first footstep is negatively correlated with the volume of the second footstep; and synthesizing the first footstep with the adjusted volume and the second footstep with the adjusted volume into the current footstep sound effect in the game scene.

[0005] Optionally, adjusting the volume of the first footsteps and the volume of the second footsteps based on the current rainfall includes: determining the rainfall range into which the current rainfall falls; and adjusting the volume of the first footsteps to a first volume corresponding to the rainfall range, and adjusting the volume of the second footsteps to a second volume corresponding to the rainfall range based on a mapping relationship; wherein the mapping relationship is used to characterize the mapping relationship between the rainfall range, the volume of the first footsteps, and the volume of the second footsteps; the rainfall range is negatively correlated with the volume of the first footsteps, and the rainfall range is positively correlated with the volume of the second footsteps.

[0006] Optionally, adjusting the volume of the first footsteps and the volume of the second footsteps based on the current rainfall includes: determining a trend of the current rainfall, wherein the trend includes the current rainfall increasing and the current rainfall decreasing; when the trend indicates that the current rainfall is increasing, linearly reducing the volume of the first footsteps and linearly increasing the volume of the second footsteps based on the trend; and when the trend indicates that the current rainfall is decreasing, linearly increasing the volume of the first footsteps and linearly reducing the volume of the second footsteps based on the trend.

[0007] Optionally, the method further includes: increasing a low-pass cutoff frequency of the first footsteps when the volume of the first footsteps is increased; and decreasing a low-pass cutoff frequency of the first footsteps when the volume of the first footsteps is decreased.

[0008] Optionally, after synthesizing the first footsteps with adjusted volume and the second footsteps with adjusted volume into a footstep sound effect in the game scene, the method further includes: adjusting the first footsteps with adjusted volume and the second footsteps with adjusted volume again based on the same adjustment ratio of the game scene sound.

[0009] Optionally, obtaining the current rainfall in the game scene includes: determining the current accumulated rainfall in the game scene based on target parameters, wherein the target parameters include: rainfall intensity and rainfall duration, or the target parameters include: rainfall intensity, rainfall duration and water permeability of the terrain material in the game scene; and determining the accumulated rainfall as the current rainfall.

[0010] Optionally, the game scene is determined according to the current position of the virtual character; and the first footsteps are selected according to the terrain material of the game scene and / or the second footsteps are selected according to the terrain material of the game scene.

[0011] In a second aspect of the implementation of the present application, a device for synthesizing footstep sound effects in a game scene is provided, comprising: an acquisition module for acquiring the current rainfall in the game scene, wherein the game scene has a footstep sound effect including a first footstep, and the first footstep refers to a footstep produced in a non-raining scene; an adding module for adding a second footstep to the game scene when the current rainfall exceeds a preset rainfall value, wherein the second footstep refers to a footstep produced in a raining scene; a first adjustment module for adjusting the volume of the first footstep and the volume of the second footstep based on the current rainfall, wherein the volume of the first footstep is negatively correlated with the volume of the second footstep; and a synthesis module for synthesizing the first footstep with the adjusted volume and the second footstep with the adjusted volume into the current footstep sound effect in the game scene.

[0012] In the third aspect of the implementation of the present application, an electronic device is also provided, including a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; the memory is used to store computer programs; and the processor is used to implement the method steps described in the first aspect when executing the program stored in the memory.

[0013] In a fourth aspect of the implementation of the present application, a computer-readable storage medium is further provided, wherein the computer-readable storage medium stores instructions that, when executed on a computer, enable the computer to execute the method steps described in the first aspect above.

[0014] Through the embodiments of the present application, since the game scene includes a footstep sound effect of a first footstep, and when the current rainfall in the game scene exceeds a preset rainfall value, a second footstep will be added to the game scene, and then the volume of the first footstep generated in the rainy scene and the volume of the second footstep generated in the non-rainy scene are adjusted based on the current rainfall, and then the first footstep with adjusted volume and the second footstep with adjusted volume are synthesized into a footstep sound effect in the game scene. Since the volume of the first footstep is negatively correlated with the volume of the second footstep, that is, in the rainy scene, the second footstep will be reduced while the first footstep is increased, or the second footstep will be increased while the first footstep is reduced. In other words, the superposition of footsteps in the game scene of the present application is more in line with the sound auditory effect of rainy footsteps in the real world, thereby solving the problem of poor auditory realism of footsteps in rainy days in game scenes in the prior art. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art.

[0016] Figure 1FIG1 is a flow chart of a method for synthesizing footstep sound effects in a game scene according to an embodiment of the present application;

[0017] Figure 2 FIG2 is a second flow chart of a method for synthesizing footstep sound effects in a game scene according to an embodiment of the present application;

[0018] Figure 3 Schematic diagram of a device for synthesizing footstep sound effects in a game scene according to another embodiment of the present application;

[0019] Figure 4 Schematic diagram of the structure of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0020] To make the purpose, technical solutions, and advantages of the embodiments of this application more clear, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0021] In the following description, the suffixes such as "module" and "unit" used to represent elements are only used to facilitate the description of this application and have no specific meaning. Therefore, "module" and "component" can be used interchangeably.

[0022] The embodiment of the present application provides a method for synthesizing footstep sound effects in a game scene, such as Figure 1 Shown, including:

[0023] Step 102: obtaining the current rainfall in the game scene, wherein the game scene includes a footstep sound effect of a first footstep, and the first footstep refers to a footstep sound produced in a scene where it is not raining;

[0024] It should be noted that the rainfall in the game scene involved in the embodiments of the present application can be similar to the rainfall in the real scene. For example, in the real world, light rain refers to a rainfall process with less than 5 mm of precipitation within 12 hours or less than 10 mm of precipitation within 24 hours; moderate rain refers to a rainfall process with 5 to 15 mm of precipitation within 12 hours or 10 to 25 mm of precipitation within 24 hours; heavy rain refers to a rainfall process with 15 to 30 mm of precipitation within 12 hours or 25 to 50 mm of precipitation within 24 hours; rainstorm refers to a rainfall process with 30 to 70 mm of precipitation within 12 hours or 50 to 100 mm of precipitation within 24 hours; heavy rainstorm refers to a rainfall process with 70 to 140 mm of precipitation within 12 hours or 100 to 250 mm of precipitation within 24 hours; and extremely heavy rainstorm refers to a rainfall process with more than 140 mm of precipitation within 12 hours or more than 250 mm of precipitation within 24 hours. In the game scene, similar settings can be made for the rainfall level based on the real scene, or corresponding settings can be made according to the specific game scene.

[0025] In addition, it should be noted that the game scene in the embodiment of the present application corresponds to the location of the virtual character in the game, that is, the current rainfall in the game scene refers to the local area centered on the location of the virtual character. This method can further reduce the error of the current rainfall. Because in the game, there may be obstructions above the location of the virtual character. If there are obstructions, the current rainfall at the location of the virtual character needs to take the rain-shielding effect of the obstructions into account, rather than directly referring to the rainfall at other locations without obstructions. This method can further simulate the real-world scene and provide gamers with a more realistic gaming experience.

[0026] Step 104, when the current rainfall exceeds the preset rainfall value, adding a second footstep to the game scene, wherein the second footstep sound refers to the footstep sound generated in the rain scene;

[0027] Step 106, adjusting the volume of the first footstep and the volume of the second footstep based on the current rainfall, wherein the volume of the first footstep is negatively correlated with the volume of the second footstep; and

[0028] It's important to note that the first footstep sound won't occur in low rainfall conditions, such as a light rain of only 3mm. Therefore, the volume of the first and second footstep sounds in the game scene will be adjusted only when the current rainfall exceeds a preset value, to better reflect the real world. Furthermore, the second footstep sound is determined based on factors such as the floor texture, the avatar's body shape (sound effects like a robot swinging its arm), and its movement state (walking, running).

[0029] Step 108 : synthesize the first footstep sound after the volume is adjusted and the second footstep sound after the volume is adjusted into the current footstep sound effect in the game scene.

[0030] Through the above steps 102 to 108, since the game scene includes the footstep sound effect of the first footstep, and when the current rainfall in the game scene exceeds the preset rainfall value, a second footstep will be added to the game scene, and then the volume of the first footstep generated in the rainy scene and the volume of the second footstep generated in the non-rainy scene are adjusted based on the current rainfall, and then the first footstep with adjusted volume and the second footstep with adjusted volume are combined into the footstep sound effect in the game scene. Since the volume of the first footstep is negatively correlated with the volume of the second footstep, that is, in the rainy scene, the second footstep will be reduced while the first footstep is increased, or the second footstep will be increased while the first footstep is reduced. In other words, the superposition of footsteps in the game scene of the present application is more consistent with the sound auditory effect of rainy footsteps in the real world, thereby solving the problem of poor auditory realism of footsteps in rainy days in game scenes in the prior art.

[0031] In addition, from the perspective of enhancing realism, for the situation where the current rainfall does not exceed the preset rainfall value and is greater than zero, the influence of rain on footsteps can be simulated by adjusting the low-pass cutoff frequency of the first footsteps (corresponding to the footsteps generated in the non-raining scene). For example, when the process changes from no rain to rainfall, the low-pass cutoff frequency of the first footsteps can be appropriately lowered when the current rainfall does not exceed the preset rainfall value and is greater than zero, making the first footsteps sound more dull. In the process from rainfall to no rain, the low-pass cutoff frequency of the first footsteps can be appropriately increased when the current rainfall does not exceed the preset rainfall value and is greater than zero.

[0032] In an optional implementation manner of the embodiment of the present application, the method of adjusting the volume of the first footstep sound and the volume of the second footstep sound based on the current rainfall involved in step 104 may further include:

[0033] Step 11, determining the rainfall range into which the current rainfall falls; and

[0034] Step 12: adjusting the volume of the first footstep sound to a first volume corresponding to the rainfall range based on the mapping relationship, and adjusting the volume of the second footstep sound to a second volume corresponding to the rainfall range;

[0035] The mapping relationship is used to represent the mapping relationship between the rainfall range, the volume of the first footstep, and the volume of the second footstep; the rainfall range is negatively correlated with the volume of the first footstep, and the rainfall range is positively correlated with the volume of the second footstep.

[0036] In the above steps 11 and 12, in a specific example, the rainfall range may include: 0-25 mm for light rain, 25-50 mm for moderate rain, 50-75 mm for heavy rain, and 75-100 mm for torrential rain. Furthermore, the first footstep sound corresponding to light rain is 40 decibels, and the second footstep sound is 30 decibels; the first footstep sound corresponding to moderate rain is 50 decibels, and the second footstep sound is 20 decibels; the first footstep sound corresponding to heavy rain is 60 decibels, and the second footstep sound is 15 decibels; and the first footstep sound corresponding to torrential rain is 60 decibels, and the second footstep sound is 10 decibels. If the preset rainfall value is 10mm and the current rainfall is 40mm, the current rainfall falls within the rainfall range of 25-50mm. At this time, the first footstep sound needs to be adjusted to 40 decibels and the second footstep sound needs to be adjusted to 30 decibels. If the current rainfall is 60mm, the current rainfall falls within the rainfall range of 50-75mm. At this time, the first footstep sound needs to be adjusted to 60 decibels and the second footstep sound needs to be adjusted to 15 decibels.

[0037] It can be seen that the method in the above steps 11 and 12 is a nonlinear adjustment of the first footstep and the second footstep according to the current rainfall. This method directly adjusts the first footstep and the second footstep according to the rainfall range into which the current rainfall falls. It is not only convenient and fast but also conforms to the sound effect of footsteps in rain scenes in the real world.

[0038] It should be noted that the above rainfall range and the specific corresponding first footstep sounds and second footstep sounds are merely examples, and can be set accordingly according to actual needs in different game scenarios.

[0039] In another optional implementation of the embodiment of the present application, the method of adjusting the volume of the first footstep sound and the volume of the second footstep sound based on the current rainfall involved in step 104 may further include:

[0040] Step 21, determining the trend of the current rainfall, wherein the trend includes the current rainfall being increasingly heavier and the current rainfall being increasingly lighter;

[0041] Step 22, when the trend indicates that the current rainfall is increasing, linearly reduce the volume of the first footstep sound and linearly increase the volume of the second footstep sound based on the trend;

[0042] Step 23 : When the trend indicates that the current rainfall is decreasing, the volume of the first footsteps is linearly increased and the volume of the second footsteps is linearly decreased based on the trend.

[0043] As can be seen from steps 21 through 23 above, the first and second footsteps are linearly adjusted based on the current rainfall trend. Specifically, as long as the current rainfall increases, the volume of the second footstep increases and the volume of the first footstep decreases in real time. In a specific example, the current rainfall trend and the first footstep can form a preset direct proportional function, while the current rainfall trend and the second footstep can form a preset inverse proportional function. The constants in the direct and inverse proportional functions can be set accordingly based on actual conditions. Because steps 21 through 23 linearly adjust the first and second footsteps in real time based on the current rainfall trend, they better align with the footstep sound effects of a real-world rainy scene compared to the nonlinear adjustment of the first and second footsteps in steps 11 and 12 above.

[0044] It should be noted that the current amount of rain decreasing in the embodiments of the present application can refer to the amount of rain decreasing, for example, from heavy rain to moderate rain, and then from moderate rain to light rain. Alternatively, in the current game scene, there is an obstruction above the game player that can block the rain, but the obstruction cannot completely block the rain. However, the rain at this time is smaller than when there is no obstruction. In this game scene where the current amount of rain is decreasing, the first footstep sound and the second footstep sound are gradually changed, that is, the volume of the first footstep sound gradually increases, and the volume of the second footstep sound gradually decreases. If the current amount of rain decreases until it stops raining, the first footstep sound can be directly eliminated.

[0045] In an optional implementation of the embodiment of the present application, the method of the embodiment of the present application may further include:

[0046] Step 31, increasing the low-pass cutoff frequency of the first footsteps while increasing the volume of the first footsteps; and

[0047] Step 32: While reducing the volume of the first footsteps, reduce the low-pass cutoff frequency of the first footsteps.

[0048] For the low-pass cutoff frequency involved in the embodiments of the present application, the frequency below a certain frequency is the passband, and the frequency above a certain frequency is the stopband. Therefore, increasing the low-pass cutoff frequency of the first footsteps means increasing the cutoff frequency, that is, the frequency range of the passband is wider and the frequency range of the stopband is narrower; conversely, reducing the low-pass cutoff frequency of the first footsteps means reducing the cutoff frequency, that is, the frequency range of the passband is narrower and the frequency range of the stopband is wider.

[0049] In another optional implementation of the embodiment of the present application, after the first footstep sound with the adjusted volume and the second footstep sound with the adjusted volume are synthesized into the footstep sound effect in the game scene, such as Figure 2 As shown, the method steps of the embodiment of the present application may also include:

[0050] Step 110 : Adjust the first footstep sound and the second footstep sound after the volume adjustment again based on the same adjustment ratio of the game scene sound.

[0051] It can be seen that if the overall scene sound effects in the game scene change, the first and second footstep sounds after adjusting the volume also need to be adjusted accordingly. For example, if the volume of the game background sound effects increases by 30%, the first and second footstep sounds after adjusting the volume also need to be increased by 30%. If the volume of the game background sound effects decreases by 20%, the first and second footstep sounds after adjusting the volume also need to be decreased by 20%. This ensures that the synthesized footstep sound effects are consistent with the changes in the overall game scene sound effects, ensuring the integrity of the entire game sound effects.

[0052] In an optional implementation of the embodiment of the present application, the method of obtaining the current rainfall in the game scene involved in the above step 102 may further include:

[0053] Step 41, determining the current accumulated rainfall in the game scene according to target parameters, wherein the target parameters include: rainfall intensity and rainfall duration, or the target parameters include: rainfall intensity, rainfall duration and water permeability of the terrain material in the game scene;

[0054] Step 42: Determine the accumulated rainfall as the current rainfall.

[0055] It should be noted that the rainfall intensity in the embodiments of the present application needs to consider whether there is an obstruction above the virtual character that can block the rain, that is, the rainfall intensity refers to the rainfall intensity after passing through the obstruction. For example, it refers to the rainfall intensity after the weighted rainfall intensity of the sky in the actual game, which is the result of multiplying the rainfall intensity of the sky by the weighted value, wherein the weighted value is less than 1 and is related to the obstruction effect of the obstruction above the virtual character's position, that is, if the obstruction has a good rain-blocking effect, the weighted value is smaller, and if the obstruction has a poor rain-blocking effect, the weighted value is smaller. The above-mentioned method of determining the rainfall intensity by weighting is only an example, and the rainfall intensity after passing through the obstruction can also be determined by other methods.

[0056] In addition, cumulative rainfall typically refers to the product of rainfall intensity and duration. However, in some scenarios, the current terrain's permeability must also be considered. This permeability refers to the terrain's water absorption and the speed at which rainwater can penetrate it. Different materials have different permeabilities; for example, dirt has a much higher permeability than concrete. Furthermore, in this embodiment of the application, the cumulative rainfall also needs to consider the terrain of the avatar's location. Specifically, the target parameters can also include terrain information, such as whether the location has a slope or whether it is a depression. This is because, in locations with slopes, the cumulative rainfall will be less than the actual product of rainfall intensity and duration. In depressions, the cumulative rainfall will be greater than the actual product of rainfall intensity and duration. In other words, the current rainfall in this embodiment of the application needs to comprehensively consider various factors to more realistically reproduce real-world rainfall conditions in the game scene, thereby more realistically simulating real-world footsteps and providing users with a more realistic gaming experience.

[0057] In an optional implementation manner in the embodiment of the present application, the method steps in the embodiment of the present application may further include:

[0058] Step 51, determining the game scene according to the current position of the virtual character; and

[0059] Step 52: Select the first footstep sound according to the terrain material of the game scene and / or select the second footstep sound according to the terrain material of the game scene.

[0060] As can be seen, in the implementation of this application, although the first footstep sound refers to the footstep sound produced in a scene without rain, and the second footstep sound refers to the footstep sound produced in a scene with rain, the type of the first footstep sound and the type of the second footstep sound are different depending on the different terrain materials in the game scene. For example, if the terrain material in the current game scene is wooden flooring, the second footstep sound will be different from the second footstep sound in the current game scene if the terrain material is concrete flooring. The footstep sound on wooden flooring is crisper, while the footstep sound on concrete flooring is muffled. The above is just an example. The type of footstep sound corresponding to the specific material in the game scene can be set accordingly with reference to the footstep sound in the real world.

[0061] Corresponding to the above Figure 1 , the embodiment of the present application also provides a device for synthesizing footstep sound effects in a game scene, such as Figure 3 As shown, the device includes:

[0062] an acquisition module 32 for acquiring a current rainfall amount in a game scene, wherein the game scene has a footstep sound effect including a first footstep sound, wherein the first footstep sound is a footstep sound generated in a scene where it is not raining;

[0063] An adding module 34 is configured to add a second footstep to the game scene when the current rainfall exceeds a preset rainfall value, wherein the second footstep sound refers to the footstep sound generated in the rain scene;

[0064] a first adjustment module 36 for adjusting the volume of the first footstep and the volume of the second footstep based on the current rainfall, wherein the volume of the first footstep is negatively correlated with the volume of the second footstep; and

[0065] The synthesis module 38 is configured to synthesize the first footstep sound after the volume is adjusted and the second footstep sound after the volume is adjusted into a current footstep sound effect in the game scene.

[0066] Through the device of the embodiment of the present application, since the game scene includes a footstep sound effect of a first footstep, and when the current rainfall in the game scene exceeds a preset rainfall value, a second footstep will be added to the game scene, and then the volume of the first footstep generated in the rainy scene and the volume of the second footstep generated in the non-rainy scene are adjusted based on the current rainfall, and then the first footstep with adjusted volume and the second footstep with adjusted volume are synthesized into the footstep sound effect in the game scene. Since the volume of the first footstep is negatively correlated with the volume of the second footstep, that is, in the rainy scene, the second footstep will be reduced while the first footstep is increased, or the second footstep will be increased while the first footstep is reduced. In other words, the superposition of footsteps in the game scene of the present application is more in line with the sound auditory effect of rainy footsteps in the real world, thereby solving the problem of poor auditory realism of footsteps in rainy days in game scenes in the prior art.

[0067] Optionally, the first adjustment module 34 in the embodiment of the present application may further include: a first determination unit, used to determine the rainfall range into which the current rainfall falls; and a first adjustment unit, used to adjust the volume of the first footsteps to a first volume corresponding to the rainfall range based on a mapping relationship, and adjust the volume of the second footsteps to a second volume corresponding to the rainfall range; wherein the mapping relationship is used to characterize the mapping relationship between the rainfall range, the volume of the first footsteps and the volume of the second footsteps; the rainfall range is negatively correlated with the volume of the first footsteps, and the rainfall range is positively correlated with the volume of the second footsteps.

[0068] Optionally, the first adjustment module 34 in the embodiment of the present application may further include: a second determination unit, used to determine the trend of the current rainfall, wherein the trend includes the current rainfall increasing and the current rainfall decreasing; a second adjustment unit, used to linearly reduce the volume of the first footsteps and linearly increase the volume of the second footsteps based on the trend when the trend indicates that the current rainfall is increasing; and a third adjustment unit, used to linearly increase the volume of the first footsteps and linearly reduce the volume of the second footsteps based on the trend when the trend indicates that the current rainfall is decreasing.

[0069] Optionally, the device in the embodiment of the present application may also include: a second adjustment module, used to increase the low-pass cutoff frequency of the first footsteps while increasing the volume of the first footsteps; and a third adjustment module, used to reduce the low-pass cutoff frequency of the first footsteps while reducing the volume of the first footsteps.

[0070] Optionally, the device in the embodiment of the present application may also include: a fourth adjustment module, which is used to adjust the first footsteps with adjusted volume and the second footsteps with adjusted volume again based on the same adjustment ratio of the game scene sound after synthesizing the first footsteps with adjusted volume and the second footsteps with adjusted volume into a footstep sound effect in the game scene.

[0071] Optionally, the acquisition module 32 in the embodiment of the present application may further include: a second determination unit, used to determine the current accumulated rainfall in the game scene based on target parameters, wherein the target parameters include: rainfall intensity and rainfall duration, or the target parameters include: rainfall intensity, rainfall duration and the permeability of the terrain material in the game scene; a third determination unit, used to determine the accumulated rainfall as the current rainfall.

[0072] Optionally, the device of an embodiment of the present application may further include: a determination module for determining a game scene based on the current position of the virtual character; a selection module for selecting a first footstep sound based on the terrain material of the game scene and / or selecting a second footstep sound based on the terrain material of the game scene.

[0073] The present application also provides an electronic device, such as Figure 4 As shown, it includes a processor 401, a communication interface 402, a memory 403 and a communication bus 404, wherein the processor 401, the communication interface 402, and the memory 403 communicate with each other through the communication bus 404;

[0074] Memory 403, used for storing computer programs;

[0075] Processor 401 is used to execute the program stored in memory 403 to achieve Figure 1 The method steps in Figure 1 The method and steps are the same as in , and will not be repeated here.

[0076] The communication bus mentioned in the above terminal can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 4 Only one thick line is used in the diagram, but this does not mean that there is only one bus or one type of bus.

[0077] The communication interface is used for communication between the above terminal and other devices.

[0078] The memory may include random access memory (RAM) or non-volatile memory, such as at least one disk storage. Alternatively, the memory may be at least one storage device located away from the processor.

[0079] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, and discrete hardware components.

[0080] In another embodiment provided in the present application, a computer-readable storage medium is also provided, which stores instructions. When the computer-readable storage medium is run on a computer, it enables the computer to execute the method for synthesizing footstep sound effects in a game scene described in any of the above embodiments.

[0081] In another embodiment provided by the present application, a computer program product including instructions is also provided, which, when executed on a computer, enables the computer to execute the method for synthesizing footstep sound effects in a game scene described in any of the above embodiments.

[0082] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When software is used for implementation, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website, computer, server or data center to another website, computer, server or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrations. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)).

[0083] It should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply the existence of any such actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or device comprising the element.

[0084] Each embodiment in this specification is described in a related manner. Similar parts between the various embodiments can be referred to in conjunction with each other. Each embodiment focuses on the differences between the other embodiments. In particular, the system embodiment is generally similar to the method embodiment, so the description is relatively simple. For related parts, refer to the description of the method embodiment.

[0085] The above description is only a preferred embodiment of the present application and is not intended to limit the scope of protection of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application are included in the scope of protection of the present application.

Claims

1. A method for synthesizing footstep sound effects in a game scene, characterized in that: include: Obtaining a current rainfall amount in a game scene, wherein the game scene includes a footstep sound effect of a first footstep, wherein the first footstep sound refers to a footstep sound generated in a scene where it is not raining; When the current rainfall exceeds a preset rainfall value, adding a second footstep sound to the game scene, wherein the second footstep sound refers to the footstep sound generated in the rain scene; adjusting the volume of the first footstep and the volume of the second footstep based on the current rainfall, wherein the volume of the first footstep is negatively correlated with the volume of the second footstep; and synthesizing the first footstep sound after the volume is adjusted and the second footstep sound after the volume is adjusted into a current footstep sound effect in the game scene; The adjusting the volume of the first footstep and the volume of the second footstep based on the current rainfall includes: determining a trend of the current rainfall, wherein the trend includes increasing rainfall and decreasing rainfall; and if the trend indicates increasing rainfall, linearly reducing the volume of the first footstep and linearly increasing the volume of the second footstep based on the trend; and In a case where the trend indicates that the current rainfall is decreasing, the volume of the first footsteps is linearly increased and the volume of the second footsteps is linearly decreased based on the trend.

2. The method according to claim 1, characterized in that The method further comprises: In the case of increasing the volume of the first footsteps, increasing the low-pass cutoff frequency of the first footsteps; and When the volume of the first footsteps is reduced, the low-pass cutoff frequency of the first footsteps is reduced.

3. The method according to claim 1, characterized in that After synthesizing the first footstep sound with the adjusted volume and the second footstep sound with the adjusted volume into a footstep sound effect in the game scene, the method further includes: The first footstep sound after volume adjustment and the second footstep sound after volume adjustment are adjusted again based on the same adjustment ratio of the game scene sound.

4. The method according to claim 1, wherein The method of obtaining the current rainfall in the game scene includes: Determining a current accumulated rainfall in the game scene according to target parameters, wherein the target parameters include rainfall intensity and rainfall duration, or the target parameters include rainfall intensity, rainfall duration, and water permeability of a terrain material in the game scene; and The accumulated rainfall is determined as the current rainfall.

5. The method according to claim 1, wherein The method further comprises: Determining the game scene based on the current position of the virtual character; and The first footstep sound is selected according to the terrain material of the game scene and / or the second footstep sound is selected according to the terrain material of the game scene.

6. A device for synthesizing footstep sound effects in a game scene, characterized in that: include: An acquisition module, configured to acquire a current rainfall amount in a game scene, wherein the game scene has a footstep sound effect including a first footstep sound, wherein the first footstep sound refers to a footstep sound generated in a scene where it is not raining; An adding module, configured to add a second footstep sound to the game scene when the current rainfall exceeds a preset rainfall value, wherein the second footstep sound refers to the footstep sound generated in a rainy scene; a first adjustment module, configured to adjust the volume of a first footstep and a volume of a second footstep based on the current rainfall, wherein the volume of the first footstep is negatively correlated with the volume of the second footstep; and a synthesis module, configured to synthesize the first footstep sound after the volume is adjusted and the second footstep sound after the volume is adjusted into a current footstep sound effect in the game scene; Among them, the first adjustment module includes: a second determination unit, used to determine the trend of the current rainfall, wherein the trend includes the current rainfall increasing and the current rainfall decreasing; a second adjustment unit, used to linearly reduce the volume of the first footsteps and linearly increase the volume of the second footsteps based on the trend when the trend indicates that the current rainfall is increasing; and a third adjustment unit, used to linearly increase the volume of the first footsteps and linearly reduce the volume of the second footsteps based on the trend when the trend indicates that the current rainfall is decreasing.

7. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus; Memory for storing computer programs; A processor, configured to implement the method according to any one of claims 1 to 5 when executing a program stored in a memory.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Footstep sound feedback method and apparatus, and virtual reality system

    CN107172542A

  • Sound effect adjustment method and apparatus, electronic device, and computer readable storage medium

    CN107179908A

  • Sound effect playing method and device, terminal and storage medium

    CN110349558A