CN108465241B - Game sound reverberation processing method and device, storage medium and electronic equipment - Google Patents

Game sound reverberation processing method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN108465241B
CN108465241B CN201810146129.1A CN201810146129A CN108465241B CN 108465241 B CN108465241 B CN 108465241B CN 201810146129 A CN201810146129 A CN 201810146129A CN 108465241 B CN108465241 B CN 108465241B
Authority
CN
China
Prior art keywords
reverberation
virtual
virtual resource
determining
game scene
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810146129.1A
Other languages
Chinese (zh)
Other versions
CN108465241A (en
Inventor
万长锟
姚志茂
沈剑锋
叶永盛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Netease Hangzhou Network Co Ltd
Original Assignee
Netease Hangzhou Network Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Netease Hangzhou Network Co Ltd filed Critical Netease Hangzhou Network Co Ltd
Priority to CN201810146129.1A priority Critical patent/CN108465241B/en
Publication of CN108465241A publication Critical patent/CN108465241A/en
Application granted granted Critical
Publication of CN108465241B publication Critical patent/CN108465241B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/50Controlling the output signals based on the game progress
    • A63F13/54Controlling the output signals based on the game progress involving acoustic signals, e.g. for simulating revolutions per minute [RPM] dependent engine sounds in a driving game or reverberation against a virtual wall
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F2300/00Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game
    • A63F2300/60Methods for processing data by generating or executing the game program
    • A63F2300/6063Methods for processing data by generating or executing the game program for sound processing
    • A63F2300/6081Methods for processing data by generating or executing the game program for sound processing generating an output signal, e.g. under timing constraints, for spatialization

Abstract

The present disclosure provides a method and apparatus for processing game sound reverberation, a storage medium, and an electronic device, wherein a current position of a virtual object in a game scene is obtained; determining virtual resources within a preset range in the game scene according to the current position; determining a reverberation coefficient of the virtual resource according to the position information of the virtual resource; determining the sound reverberation value of the current position of the virtual object in the game scene according to the reverberation coefficient of the virtual resource, realizing dynamic change of sound reverberation effect according to the real-time condition of the virtual resource in the game scene, and simultaneously greatly reducing the resource consumption of a system so that a player can obtain better immersive sound effect experience in a game; in addition, for developers, a large amount of manpower is not required to be consumed for marking the sound effects corresponding to all the positions in the game scene.

Description

Game sound reverberation processing method and device, storage medium and electronic equipment
Technical Field
The present disclosure relates to the field of game technologies, and in particular, to a method and an apparatus for processing game sound reverberation, a storage medium, and an electronic device.
Background
In a PC-side game or a movie work, in order to enhance the substitution feeling of a user, a sound in a certain scene is usually processed, for example, a sound reverberation process is introduced in a cave scene, and a sound reverberation synthesis is performed through a series of algorithms. Therefore, the method is not suitable for mobile terminal games with weak processing performance, and most of games are realized by manually marking scene environments in a game map and adopting different reverberation parameters through different scene environments based on efficiency consideration. This method itself consumes a lot of manpower, and dynamic adjustment of the sound reverberation according to the specific situation of the game scene cannot be realized. We need to propose a scheme for sound reverberation processing for mobile end games.
It is to be noted that the information disclosed in the above background section is only for enhancement of understanding of the background of the present disclosure, and thus may include information that does not constitute prior art known to those of ordinary skill in the art.
Disclosure of Invention
An object of the present disclosure is to provide a method and apparatus for processing reverberation of game sound, a storage medium, and an electronic device, thereby overcoming, at least to some extent, one or more of the problems due to the limitations and disadvantages of the related art.
According to an aspect of the present disclosure, there is provided a method for processing game sound reverberation, the method including:
acquiring the current position of a virtual object in a game scene;
determining virtual resources within a preset range in the game scene according to the current position;
determining a reverberation coefficient of the virtual resource according to the position information of the virtual resource;
and determining the sound reverberation value of the current position of the virtual object in the game scene according to the reverberation coefficient of the virtual resource.
In an exemplary embodiment of the present disclosure, the determining, according to the current position, a virtual resource within a preset range in the game scene includes:
and determining the virtual resources in at least one preset direction in a preset range in the game scene according to the current position.
In an exemplary embodiment of the present disclosure, the determining, according to the current position, a virtual resource within a preset range in the game scene includes:
and determining the virtual resources in at least one preset direction in a preset range in the game scene according to the current position.
In an exemplary embodiment of the present disclosure, the preset range includes a plurality of preset regions, and the preset regions respectively include, according to a priority order: a first preset area to an Nth preset area, wherein N is a positive integer greater than or equal to 2;
the determining of the virtual resource in at least one preset position within a preset range in the game scene according to the current position includes:
and sequentially determining the virtual resources in at least one preset direction in the game scene in the plurality of preset areas according to the current position and the priority order.
In an exemplary embodiment of the present disclosure, the space of the game scene is divided into a plurality of geometric bodies spliced with each other, and the virtual resource is built on the surface of one of the geometric bodies or the inner section of the geometric body.
In an exemplary embodiment of the present disclosure, the determining a reverberation coefficient of the virtual resource according to the position information of the virtual resource includes:
determining a reverberation coefficient of the virtual resource according to the relative position information of the geometric body where the virtual resource is located and the geometric body where the virtual object is located; or
And determining the reverberation coefficient of the virtual resource according to the relative position information of the virtual resource and the geometric solid where the virtual object is located.
In an exemplary embodiment of the present disclosure, the determining a reverberation coefficient of the virtual resource according to the position information of the virtual resource includes:
determining a reverberation coefficient of the virtual resource according to the relative position information of the geometric body where the virtual resource is located and the geometric body where the virtual object is located; or
And determining the reverberation coefficient of the virtual resource according to the relative position information of the virtual resource and the geometric solid where the virtual object is located.
In an exemplary embodiment of the present disclosure, the method further comprises: and opening the corresponding sound reverberation effect according to the sound reverberation value.
According to an aspect of the present disclosure, there is provided a game sound reverberation processing apparatus, the apparatus including:
the virtual object position acquisition module is used for acquiring the current position of a virtual object in a game scene;
the virtual resource determining module is used for determining virtual resources in a preset range in the game scene according to the current position;
the reverberation coefficient determining module is used for determining the reverberation coefficient of the virtual resource according to the position information of the virtual resource;
and the sound reverberation value determining module is used for determining the sound reverberation value of the current position of the virtual object in the game scene according to the reverberation coefficient of the virtual resource.
According to an aspect of the present disclosure, there is provided a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the method of processing game sound reverberation as set forth in any one of the above.
According to an aspect of the present disclosure, there is provided an electronic device including:
a processor; and
a memory for storing executable instructions of the processor;
wherein the processor is configured to perform the method of processing game sound reverberation described in any one of the above via execution of the executable instructions.
The invention discloses a method and a device for processing game sound reverberation, a storage medium and an electronic device. By the method for processing the game sound reverberation in the exemplary embodiment, the position information of the virtual object in the game scene and the virtual resource in the preset range are acquired to determine the reverberation coefficient, so that the sound reverberation value of the virtual object in the game scene is determined, the dynamic change of the sound reverberation effect can be realized according to the real-time condition of the virtual resource in the game scene, and meanwhile, the resource consumption of a system is greatly reduced, so that a player can obtain better immersive sound effect experience in the game; in addition, for developers, a large amount of manpower is not required to be consumed for marking the sound effects corresponding to all the positions in the game scene.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The above and other features and advantages of the present disclosure will become more apparent by describing in detail exemplary embodiments thereof with reference to the attached drawings. It is to be understood that the drawings in the following description are merely exemplary of the disclosure, and that other drawings may be derived from those drawings by one of ordinary skill in the art without the exercise of inventive faculty. In the drawings:
FIG. 1 is a flow chart of a method for processing game sound reverberation according to the present disclosure;
FIG. 2 is a schematic diagram of virtual objects and virtual resources in an exemplary embodiment of the present disclosure;
FIG. 3a is a schematic diagram illustrating the determination of the reverberation coefficient of the virtual object relative to the virtual resource in an exemplary embodiment of the present disclosure;
FIG. 3b is a schematic diagram illustrating the determination of the reverberation coefficient of the virtual object relative to the virtual resource in another exemplary embodiment of the present disclosure;
FIG. 4 is a schematic illustration of 2 predetermined area ranges in another exemplary embodiment of the present disclosure;
FIG. 5 is a schematic illustration of the geometry of a game scene in another exemplary embodiment of the present disclosure;
FIG. 6 is a schematic diagram of virtual objects and virtual resources in an X-Z plane in another exemplary embodiment of the present disclosure;
FIG. 7 is a diagram illustrating virtual objects and virtual resources in the Y-axis direction according to another exemplary embodiment of the disclosure;
fig. 8 is a schematic diagram of the reverberation coefficient corresponding to the virtual resource in the Y-axis direction in another exemplary embodiment of the present disclosure;
FIG. 9 is a schematic diagram of virtual objects and virtual resources in an X-Z plane in another exemplary embodiment of the present disclosure;
fig. 10 is a block diagram of an information processing apparatus in an exemplary embodiment of the present disclosure;
FIG. 11 is a schematic diagram of an electronic device in an exemplary embodiment of the disclosure;
fig. 12 is a schematic structural diagram of a storage medium in an exemplary embodiment of the disclosure.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many different forms and should not be construed as limited to the embodiments set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art. The same reference numerals denote the same or similar parts in the drawings, and thus, a repetitive description thereof will be omitted.
Furthermore, the described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the disclosure. One skilled in the relevant art will recognize, however, that the embodiments of the disclosure can be practiced without one or more of the specific details, or with other methods, components, materials, devices, steps, and so forth. In other instances, well-known structures, methods, devices, implementations, materials, or operations are not shown or described in detail to avoid obscuring aspects of the disclosure.
The block diagrams shown in the figures are functional entities only and do not necessarily correspond to physically separate entities. That is, these functional entities may be implemented in the form of software, or in one or more software-hardened modules, or in different networks and/or processor devices and/or microcontroller devices.
The exemplary embodiment first discloses a method for processing game sound reverberation, and an execution main body of the method can be any mobile terminal device such as a mobile phone, a PDA, a tablet computer, a palm game terminal and an electronic device; the execution main body of the method can also be a server, and the server can be any server equipment such as one or more computers, servers, clusters and the like. As shown in fig. 1, the method includes:
s10: acquiring the current position of a virtual object in a game scene;
s20: determining virtual resources within a preset range in the game scene according to the current position of the virtual object;
s30: determining a reverberation coefficient of the virtual resource according to the position information of the virtual resource;
s40: and determining the sound reverberation value of the current position of the virtual object in the game scene according to the reverberation coefficient of the virtual resource.
By the method for processing the game sound reverberation in the exemplary embodiment, the position information of the virtual object in the game scene and the virtual resource in the preset range are acquired to determine the reverberation coefficient, so that the sound reverberation value of the virtual object in the game scene is determined, the dynamic change of the sound reverberation effect can be realized according to the real-time condition of the virtual resource in the game scene, and meanwhile, the resource consumption of a system is greatly reduced, so that a player can obtain better immersive sound effect experience in the game; in addition, for developers, a large amount of manpower is not required to be consumed for marking the sound effect corresponding to each position in the game scene.
Next, a method of processing the game sound reverberation in the present exemplary embodiment will be further described with reference to fig. 2 to 9.
In the exemplary embodiment, the graphical user interface is obtained by executing a software application on a processor of the mobile terminal and rendering the software application on a touch display of the mobile terminal, and the content displayed by the graphical user interface at least partially includes a partial or complete game scene, and the game scene includes at least one first virtual object. The specific shape of the game scene can be a square shape, and can also be other shapes (such as a circle). The game scene can include ground, mountain, stone, flower, grass, tree, building and the like.
The game scene comprises at least one virtual object, and the virtual object can be presented through a graphical user interface, and the presented content can comprise all of the virtual object or part of the virtual object. For example, in a third person perspective game, the content presented by the graphical user interface may contain all of the virtual objects; as another example, in a first-person perspective game, the content presented by the graphical user interface may contain portions of a virtual object. The virtual object may be a game virtual Character that a player operates through a mobile terminal, or may also be a Non-player Character (NPC) preset in a game scene.
The virtual resource may be a specific object in the game scene, such as a mountain, a stone, a building, a wall surface, and the like, and generally refers to an object having a certain area/volume and affecting sound propagation in the game scene. The virtual resource may be preset by a developer at a specific position in a game scene, or may be controlled by a player to be built in the game according to the game type, for example, in a building mode of the game, and may be a certain face (a minimum unit of building) of a house instead of the whole house, but the invention is not limited thereto.
In an alternative embodiment, as shown in fig. 2, taking a top view of the game scene as an example, the player may control the movement of the virtual object 100 in the game scene 200 through a handle, a stylus, a finger touch screen, or other operation forms, and obtain the current position O of the virtual object 100 in the game scene 200. Determining a virtual resource 400 within a preset range 300 in the game scene according to the current position O of the virtual object 100. Optionally, the preset range may be a preset area in a game scene, or a preset area with the virtual object as a center, and the preset range may be set by a game developer or a player, but the present invention is not limited thereto. According to the position information of the virtual resource 400, determining the corresponding reverberation coefficient alpha of the virtual resource 400, thereby determining the sound reverberation value alpha of the current position O of the virtual object 100 in the game scene.
In an alternative embodiment, step S20: the determining of the virtual resources within the preset range in the game scene according to the current position includes: and determining the virtual resources in at least one preset direction in a preset range in the game scene according to the current position. As shown in fig. 2, if four directions of east, south, west, and north are set as the preset directions based on the position O of the virtual object 100 in the game scene, accordingly, the virtual resource 400 with the preset direction of north in the preset range 300 is determined. When the virtual resources are acquired in a game scene, the virtual resources of at least one preset direction are detected, so that the acquisition efficiency of the virtual resources can be improved, and the virtual resources of the preset direction and the corresponding positions of the virtual resources can be determined as soon as possible.
In an alternative embodiment, step S30: determining a reverberation coefficient of the virtual resource according to the position information of the virtual resource, including: and determining the reverberation coefficient of the virtual resource according to the relative position information of the virtual resource and the virtual object. In the game, the simulation of the real reverberation sound effect is performed, and the sound propagation is related to the distance, as shown in fig. 3a, the virtual object 100 is located at O, and the distance between the virtual resource 401 and the virtual object 100 is assumed to be a according to the relative position information of the virtual resource 401 and the virtual object 100, so as to determine the corresponding reverberation coefficient α of the virtual resource 401. Similarly, as shown in fig. 3b, the position of the virtual object 100 is still at O, and the distance between the virtual resource 402 of the same type and the virtual object 100 within the game scene is assumed to be 2a, so as to determine the reverberation coefficient β of the virtual resource 402 as α/2. In addition, when obtaining the reverberation coefficient of the virtual resource, the attenuation of the sound can be considered according to the specific requirements, and the invention is not limited to this. By acquiring the relative position information of the virtual resources and the virtual objects and determining the reverberation coefficient according to the relative position information, the relative distance between the virtual objects and the virtual resources controlled by the player is directly fed back from the simulation angle of the sound effect, and the immersion feeling of the game player is enhanced.
In an optional embodiment, the preset range includes a plurality of preset regions, and the preset regions respectively include, according to a priority order: a first preset area to an Nth preset area, wherein N is a positive integer greater than or equal to 2; step S20: determining virtual resources in at least one preset position in a preset range in the game scene according to the current position, further comprising: and sequentially determining the virtual resources in at least one preset direction in the game scene in the plurality of preset areas according to the current position and the priority order. For example, the first preset area may be set as an area with a small area and/or an area closer to the virtual object, and the priority is the highest; in contrast, the second predetermined area covers an area with a larger area and/or a larger distance from the virtual object, and so on.
As shown in fig. 4, it is assumed that N is 2, that is, the preset range is set as 2 preset regions, which are the first preset region 301 and the second preset region 302, respectively, and the priority is set such that the first preset region 301 is higher than the second preset region 302. As shown in the figure, the position of the virtual object 100 is located in the center of the game scene, and according to the priority order, the virtual resource 403 in the north direction in the first preset area 301 is acquired first, and then the further acquisition of the virtual resource in the north direction is stopped, even if the virtual resource of the multilayer overlapping structure exists in the same direction, it is assumed that the sound does not penetrate through the virtual resource to propagate (even if it is weak, it can be ignored basically), so that only the virtual resource in the innermost layer (i.e. the layer closest to the virtual object) will affect the sound reverberation effect. And acquiring virtual resources in the south-pointing direction in the first preset area 301, feeding back that no corresponding virtual resource exists, and continuously acquiring the virtual resources 404 in the south-pointing direction in the second preset area 302 according to the priority order. Similarly, when N preset areas are arranged in the game scene, the virtual resources are obtained from at least one position in sequence according to the priority order, so that the virtual resource obtaining efficiency can be improved.
In an alternative embodiment, step S30: determining a reverberation coefficient of the virtual resource according to the position information of the virtual resource, further comprising:
and determining the reverberation coefficient of the virtual object according to the relative position information of the virtual resource and the virtual object.
In an alternative embodiment, the space of the game scene is divided into a plurality of mutually spliced geometric bodies, and the virtual resource is built on the surface of one geometric body or the inner section of the geometric body. The geometric bodies can be cuboids, cubes, parallelepipeds, honeycomb bodies and the like, and can be understood to be spliced with each other, so that the space of the whole game scene is formed. It should be noted that the geometric body into which the space of the game scene is divided is a logical area, for example: and the x, y and z coordinates are in a space area within the range of 0-50.
Preferably, the geometric bodies can be rectangular solids with the same length and width. As shown in fig. 5, a coordinate system XYZ is established in the space of the game scene, which is the X-Z coordinate in the horizontal direction and the Y coordinate in the vertical direction. For example, the space division method divides the space into infinite cuboids with a horizontal X of 5 meters, a Z of 5 meters, and a vertical upward Y of 3.5 meters, and the length, width, and height division values of the cuboids can be arbitrarily set by developers according to actual situations.
The following description is given by taking an example of dividing a space into a plurality of rectangular solids which are spliced with each other and have the same length and width, and it should be noted that a plurality of geometric bodies which can be spliced with each other and divide the space into any shape are included in the scope of the present disclosure.
As shown in fig. 6, taking a top view of a game scene as an example, an X-Z axis is established based on a plane of the game scene, the top view of the game scene shown in fig. 6 presents a partial game scene composed of 9 geometric objects (for example, a square bottom surface), a cross-sectional view of the displayed geometric objects is a squared structure, a current position of a virtual character is O, a virtual resource within a preset range is detected, if the geometric object where the virtual character is located is taken as the preset range, a virtual resource with A, B, C, D four wall bodies within the preset range is obtained, and since the distances from all the four wall bodies to the virtual object are the same, a reverberation coefficient of each wall body can be preset to 1 accordingly.
In an alternative embodiment, the number of virtual resources is at least 2; the determining the sound reverberation value of the virtual object at the current position in the game scene according to the reverberation coefficient of the virtual resource comprises: performing a weighted calculation on the reverberation coefficients of the plurality of virtual resources to obtain a sound reverberation value of the current position of the virtual object in the game scene. In the embodiment shown in fig. 6, the number of virtual resources in the preset range is 4, the reverberation coefficient of each virtual resource is added to 1+1+1 to 4, and the sound reverberation value of the current position of the virtual object in the game scene of the X-Z plane is obtained to be 4.
In an alternative embodiment, the reverberation coefficient of the virtual resource can also be associated with the type of the virtual resource or different game states, and the like, and a weighting calculation is performed by setting different weights in each case to obtain a final current position sound reverberation value of the virtual object in the game scene. For example: the weight of the virtual resource in the direction corresponding to the current orientation of the virtual object is set to 1.5, the weights of the virtual resources in the direction perpendicular to the orientation of the virtual object are respectively set to 1, and the weight of the virtual resource in the direction opposite to the orientation of the virtual object is set to 0.5. In the embodiment shown in fig. 6, when the current orientation of the virtual object is north (i.e. Z-axis square), the reverberation coefficients of the multiple virtual resources at each orientation are weighted to obtain the acoustic reverberation value of the current position of the virtual object in the game scene as follows: 1 × 1.5+1 × 1+1 × 0.5 ═ 4.
Furthermore, in the game scene, virtual resources may also be set in the vertical direction of the plane of the game scene. Likewise, a virtual resource within a preset range in the vertical direction is acquired, and assuming that the virtual object is in the room, the virtual resource is a ceiling located at the top of the virtual object, and the ceiling can be regarded as a virtual resource created based on the surface and/or the cross section of the geometric body according to the game scene composed of the geometric body. As shown in fig. 7, the virtual character is currently located at the position O, and in the Y-axis vertical direction, by obtaining the virtual object within the preset range, three ceilings a ', B ', and C ' exist within the preset range in the Y-axis direction, and the positions of the three ceilings and the corresponding reverberation coefficients are obtained. The setting of the reverberation coefficient can be as shown in fig. 8, according to the position relationship between the virtual resource and the virtual object in the Y-axis direction, the reverberation coefficient of the ceiling B' nearest to the virtual object is the largest, and is assumed to be 0.6, for convenience of calculation, the sum of the reverberation coefficients of the virtual resource in the same direction can be set to be 1, and then the relative positions of the ceiling and the virtual object in other positions in the Y-axis direction are the same, and the reverberation coefficient is set to be 0.05. Therefore, the reverberation coefficients of the three ceilings a ', B ', and C ' are 0.05, 0.6, and 0.05, respectively, and the sound reverberation value of the current position of the virtual object in the game scene in the Y-axis direction is 0.05+0.6+0.05 — 0.7.
As in the foregoing embodiments shown in fig. 6 and 7, the sound reverberation value of the current position of the virtual object 100 in the game scene based on the X-Z plane is 4, the sum of the sound reverberation values of the current position of the virtual object in the game scene based on the Y-axis direction is 4.7, and the sum of the sound reverberation values of the current position of the virtual object in the game scene is 4.7.
In an alternative embodiment, the method further comprises: and opening the corresponding sound reverberation effect according to the sound reverberation value. Matching the finally calculated sound reverberation value with a preset sound effect, for example, setting a sound reverberation effect containing three levels in a game, and enabling a third-level reverberation effect of a strongest sound effect if the sound reverberation value is more than or equal to 5; if the sound reverberation value is larger than or equal to 4, starting a second-level reverberation effect; if the sound reverberation value is greater than or equal to 3, a first level reverberation effect is enabled, and the specific level classification and the specific reverberation effect can be set by a developer or a player according to the type and content of the game, which is not limited in the present invention. In this embodiment, the sound reverberation value is 4.7, and accordingly a final second level reverberation effect is generated in the game based on the position of the virtual object according to the exemplary setting described above. In addition, the setting of the sound reverberation effect may be linear, making the transition of the reverberation effect more natural, but the consumption may be larger compared to a discrete-level setting, and a developer may set it according to specific needs, but the present invention is not limited thereto.
In an alternative embodiment, step S30: determining a reverberation coefficient of the virtual resource according to the position information of the virtual resource, further comprising: step S310: determining a reverberation coefficient of the virtual resource according to the relative position information between the geometry where the virtual resource is located and the geometry where the virtual object is located; or step S320: and determining the reverberation coefficient of the virtual resource according to the relative position information of the virtual resource and the geometric body where the virtual object is located.
As shown in fig. 9, taking a plan view of a game scene as an example, a current position O of a virtual object, that is, an origin position of an X-Z axis is obtained, assuming that a first preset region 303 is a cross-sectional grid of a geometric solid where the virtual object 100 is currently located, a bottom surface of the geometric solid is a square, a side length of the first preset region 303 is a side length of the bottom surface of the geometric solid, and a distance from the virtual object 100 to the first preset region 303 is one half of the side length of the geometric solid. The second preset area 304 is formed by a 3 x 3 layout of 9 geometric grids with the bottom surfaces also being squares, namely, a square nine-grid structure, and accordingly obtains virtual resources in four directions of east, west, south and north respectively. Taking the true west direction as an example, the geometric body in which the virtual object 100 is located in the same geometric body as the virtual resource a ", and the reverberation coefficient of the virtual resource B" in the true north direction of the virtual object 100 is 1. Similarly, the reverberation coefficients of the virtual resources B "and F" in the north and south directions are also 1 respectively. According to the relative position information between the geometric body where the virtual resource is located and the geometric body where the virtual object is located, the reverberation coefficient of the virtual resource is determined, the position information of the virtual resource and the position information of the virtual object can be simplified into a grid structure of the geometric bodies, all the position information is subjected to standardization processing, and the acquisition and calculation processes of the reverberation coefficient are simpler and more convenient. Optionally, the reverberation coefficient of the virtual resource may also be determined according to the relative position information of the virtual resource and the geometric body where the virtual object is located. Taking the east-oriented direction shown in fig. 9 as an example, the virtual resource is not acquired in the first preset area, and three virtual resources in the east-oriented direction are acquired in the second preset area: c ", D", E ", and the relative positions of the virtual resources and the geometric body where the virtual object 100 is located, the reverberation coefficients of the three virtual resources C", D ", E" are 0.2, 0.6, 0.2, respectively. In the present embodiment, the sound reverberation value of the current position of the virtual object 100 in the X-Z plane is 1+1+1+0.6+0.2+0.2 — 4.
Through the embodiment, the position information of the virtual object in the game scene and the virtual resource in the preset range are acquired to determine the reverberation coefficient, so that the sound reverberation value of the virtual object in the game scene is determined, the dynamic change of the sound reverberation effect can be realized according to the real-time condition of the virtual resource in the game scene, and meanwhile, the resource consumption of a system is greatly reduced, so that a player can obtain better immersive sound effect experience in the game; in addition, for developers, a large amount of manpower is not required to be consumed for marking the sound effect corresponding to each position in the game scene.
Also disclosed in the present exemplary embodiment is an apparatus for processing game sound reverberation, as shown in fig. 10, the apparatus 60 includes:
a virtual object position obtaining module 601, configured to obtain a current position of a virtual object in a game scene;
a virtual resource determining module 602, configured to determine, according to the current position, a virtual resource within a preset range in the game scene;
a reverberation coefficient determining module 603, configured to determine a reverberation coefficient of the virtual resource according to the position information of the virtual resource;
and an acoustic reverberation value determining module 604, configured to determine an acoustic reverberation value of the current position of the virtual object in the game scene according to the reverberation coefficient of the virtual resource.
The specific details of each module unit in the foregoing embodiments have been described in detail in the corresponding information processing method, and it can be understood that other unit modules included in the information processing apparatus correspond to the information processing method, and therefore are not described herein again.
It should be noted that although in the above detailed description several modules or units of the device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit, according to embodiments of the present disclosure. Conversely, the features and functions of one module or unit described above may be further divided into embodiments by a plurality of modules or units.
Fig. 11 is a schematic structural diagram of one of the electronic devices according to the embodiment of the present disclosure. As shown in fig. 11, the electronic device 910 of the present embodiment includes: a memory 911 and a processor 912. The memory 911 and the processor 912 may be connected by a bus. The graphical user interface is obtained by executing a software application on a processor of the terminal and rendering on a display device of the terminal.
A processor 912; and
a memory 911 for storing executable instructions of the processor;
wherein the processor is configured to implement the following steps via execution of the executable instructions:
acquiring the current position of a virtual object in a game scene;
determining virtual resources within a preset range in the game scene according to the current position;
determining a reverberation coefficient of the virtual resource according to the position information of the virtual resource;
and determining the sound reverberation value of the current position of the virtual object in the game scene according to the reverberation coefficient of the virtual resource.
In an optional embodiment, the determining, according to the current position, a virtual resource within a preset range in the game scene includes:
and determining the virtual resources in at least one preset direction in a preset range in the game scene according to the current position.
In an optional embodiment, the determining, according to the current position, a virtual resource within a preset range in the game scene includes:
and determining the virtual resources in at least one preset direction in a preset range in the game scene according to the current position.
In an optional embodiment, the preset range includes a plurality of preset regions, and the preset regions respectively include, according to a priority order: a first preset area to an Nth preset area, wherein N is a positive integer greater than or equal to 2;
the determining of the virtual resource in at least one preset position within a preset range in the game scene according to the current position includes:
and sequentially determining the virtual resources in at least one preset direction in the game scene in the plurality of preset areas according to the current position and the priority order.
In an alternative embodiment, the space of the game scene is divided into a plurality of mutually spliced geometric bodies, and the virtual resource is built on the surface of one geometric body or the inner section of the geometric body.
In an optional embodiment, the determining the reverberation coefficient of the virtual resource according to the position information of the virtual resource includes:
determining a reverberation coefficient of the virtual resource according to the relative position information of the geometric body where the virtual resource is located and the geometric body where the virtual object is located; or
And determining the reverberation coefficient of the virtual resource according to the relative position information of the virtual resource and the geometric solid where the virtual object is located.
In an optional embodiment, the determining the reverberation coefficient of the virtual resource according to the position information of the virtual resource includes:
determining a reverberation coefficient of the virtual resource according to the relative position information of the geometric body where the virtual resource is located and the geometric body where the virtual object is located; or
And determining the reverberation coefficient of the virtual resource according to the relative position information of the virtual resource and the geometric solid where the virtual object is located.
In an alternative embodiment, the method further comprises: and opening the corresponding sound reverberation effect according to the sound reverberation value.
By the processing method for the reverberation of the game sound provided by the exemplary embodiment of the disclosure, the position information of a virtual object in a game scene and a virtual resource in a preset range are acquired to determine a reverberation coefficient, so that the sound reverberation value of the virtual object in the game scene is determined, dynamic change of a sound reverberation effect can be realized according to the real-time condition of the virtual resource in the game scene, and meanwhile, the resource consumption of a system is greatly reduced, so that a player can obtain better immersive sound effect experience in a game; in addition, for developers, a large amount of manpower is not required to be consumed for marking the sound effect corresponding to each position in the game scene.
In alternative embodiments, the electronic device may further include one or more processors and memory resources, represented by memory, for storing instructions, such as application programs, that are executable by the processing components. The application program stored in the memory may include one or more modules that each correspond to a set of instructions. Further, the processing component is configured to execute instructions to perform the above-described method of processing game sound reverberation.
The electronic device may further include: a power component configured to power manage an executing electronic device; a wired or wireless network interface configured to connect the electronic device to a network; and an input-output (I/O) interface. The electronic device may operate based on an operating system stored in memory, such as Android, iOS, Windows, Mac OS X, Unix, Linux, FreeBSD, or the like.
Fig. 12 is a schematic structural diagram of one of the storage media according to the embodiment of the disclosure. As shown in fig. 12, a program product 1100 according to an embodiment of the invention is depicted, on which a computer program is stored which, when being executed by a processor, carries out the steps of:
acquiring the current position of a virtual object in a game scene;
determining virtual resources within a preset range in the game scene according to the current position;
determining a reverberation coefficient of the virtual resource according to the position information of the virtual resource;
and determining the sound reverberation value of the current position of the virtual object in the game scene according to the reverberation coefficient of the virtual resource.
In an optional embodiment, the determining, according to the current position, a virtual resource within a preset range in the game scene includes:
and determining the virtual resources in at least one preset direction in a preset range in the game scene according to the current position.
In an optional embodiment, the determining, according to the current position, a virtual resource within a preset range in the game scene includes:
and determining the virtual resources in at least one preset direction in a preset range in the game scene according to the current position.
In an optional embodiment, the preset range includes a plurality of preset regions, and the preset regions respectively include, according to a priority order: a first preset area to an Nth preset area, wherein N is a positive integer greater than or equal to 2;
the determining of the virtual resource in at least one preset position within a preset range in the game scene according to the current position includes:
and sequentially determining the virtual resources in at least one preset direction in the game scene in the plurality of preset areas according to the current position and the priority order.
In an alternative embodiment, the space of the game scene is divided into a plurality of mutually spliced geometric bodies, and the virtual resource is built on the surface of one geometric body or the inner section of the geometric body.
In an optional embodiment, the determining the reverberation coefficient of the virtual resource according to the position information of the virtual resource includes:
determining a reverberation coefficient of the virtual resource according to the relative position information of the geometric body where the virtual resource is located and the geometric body where the virtual object is located; or
And determining the reverberation coefficient of the virtual resource according to the relative position information of the virtual resource and the geometric solid where the virtual object is located.
In an optional embodiment, the determining the reverberation coefficient of the virtual resource according to the position information of the virtual resource includes:
determining a reverberation coefficient of the virtual resource according to the relative position information of the geometric body where the virtual resource is located and the geometric body where the virtual object is located; or
And determining the reverberation coefficient of the virtual resource according to the relative position information of the virtual resource and the geometric solid where the virtual object is located.
In an alternative embodiment, the method further comprises: and opening the corresponding sound reverberation effect according to the sound reverberation value.
By the processing method for the reverberation of the game sound provided by the exemplary embodiment of the disclosure, the position information of a virtual object in a game scene and a virtual resource in a preset range are acquired to determine a reverberation coefficient, so that the sound reverberation value of the virtual object in the game scene is determined, dynamic change of a sound reverberation effect can be realized according to the real-time condition of the virtual resource in the game scene, and meanwhile, the resource consumption of a system is greatly reduced, so that a player can obtain better immersive sound effect experience in a game; in addition, for developers, a large amount of manpower is not required to be consumed for marking the sound effect corresponding to each position in the game scene.
A computer readable storage medium may include a propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable storage medium may transmit, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied in a computer readable storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiment of the present invention can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to make a computing device (which can be a personal computer, a server, an electronic device, or a network device, etc.) execute the method according to the embodiment of the present invention.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (9)

1. A method for processing game sound reverberation, the method comprising:
acquiring the current position of a virtual object in a game scene;
determining the virtual resources in at least one preset direction in the game scene in a plurality of preset areas according to the current position in sequence according to a priority order, wherein the preset areas respectively comprise: a first preset area to an Nth preset area, wherein N is a positive integer greater than or equal to 2;
determining a reverberation coefficient of the virtual resource according to the position information of the virtual resource;
and determining the sound reverberation value of the current position of the virtual object in the game scene according to the reverberation coefficient of the virtual resource.
2. The method of claim 1, wherein determining the reverberation coefficient of the virtual resource based on the location information of the virtual resource comprises:
and determining the reverberation coefficient of the virtual resource according to the relative position information of the virtual resource and the virtual object.
3. The method of any one of claims 1-2, wherein the space of the game scene is divided into a plurality of mutually spliced geometric bodies, and the virtual resource is built on the surface of one of the geometric bodies or the inner section of the geometric body.
4. The method of claim 3, wherein determining the reverberation coefficient of the virtual resource based on the location information of the virtual resource comprises:
determining a reverberation coefficient of the virtual resource according to the relative position information of the geometric body where the virtual resource is located and the geometric body where the virtual object is located; or
And determining the reverberation coefficient of the virtual resource according to the relative position information of the virtual resource and the geometric solid where the virtual object is located.
5. The method of claim 1, wherein the number of virtual resources is at least 2; the determining the sound reverberation value of the virtual object at the current position in the game scene according to the reverberation coefficient of the virtual resource comprises:
performing a weighted calculation on the reverberation coefficients of the plurality of virtual resources to obtain a sound reverberation value of the current position of the virtual object in the game scene.
6. The method of claim 1, wherein the method further comprises: and opening the corresponding sound reverberation effect according to the sound reverberation value.
7. An apparatus for processing reverberation of game sound, the apparatus comprising:
the virtual object position acquisition module is used for acquiring the current position of a virtual object in a game scene;
a virtual resource determining module, configured to determine, according to the current position and according to a priority order, the virtual resource in at least one preset position in the game scene in a plurality of preset regions in sequence, where the preset regions respectively include, according to the priority order: a first preset area to an Nth preset area, wherein N is a positive integer greater than or equal to 2;
the reverberation coefficient determining module is used for determining the reverberation coefficient of the virtual resource according to the position information of the virtual resource;
and the sound reverberation value determining module is used for determining the sound reverberation value of the current position of the virtual object in the game scene according to the reverberation coefficient of the virtual resource.
8. An electronic device, comprising:
a processor; and
a memory for storing executable instructions of the processor;
wherein the processor is configured to perform the method of processing game sound reverberation of any one of claims 1-6 via execution of the executable instructions.
9. A computer-readable storage medium on which a computer program is stored, the computer program, when being executed by a processor, implementing the method for processing game sound reverberation according to any one of claims 1 to 6.
CN201810146129.1A 2018-02-12 2018-02-12 Game sound reverberation processing method and device, storage medium and electronic equipment Active CN108465241B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810146129.1A CN108465241B (en) 2018-02-12 2018-02-12 Game sound reverberation processing method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810146129.1A CN108465241B (en) 2018-02-12 2018-02-12 Game sound reverberation processing method and device, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN108465241A CN108465241A (en) 2018-08-31
CN108465241B true CN108465241B (en) 2021-05-04

Family

ID=63266358

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810146129.1A Active CN108465241B (en) 2018-02-12 2018-02-12 Game sound reverberation processing method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN108465241B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108924705B (en) * 2018-09-25 2021-07-02 Oppo广东移动通信有限公司 3D sound effect processing method and related product
CN109104687B (en) * 2018-09-25 2021-04-13 Oppo广东移动通信有限公司 Sound effect processing method and related product
CN109308179A (en) * 2018-09-25 2019-02-05 Oppo广东移动通信有限公司 3D sound effect treatment method and Related product
CN109529335B (en) * 2018-11-06 2022-05-20 Oppo广东移动通信有限公司 Game role sound effect processing method and device, mobile terminal and storage medium
CN110270094A (en) * 2019-07-17 2019-09-24 珠海天燕科技有限公司 A kind of method and device of game sound intermediate frequency control
CN111135572A (en) * 2019-12-24 2020-05-12 北京像素软件科技股份有限公司 Game sound effect management method and device, storage medium and electronic equipment
CN111408135B (en) * 2020-03-20 2023-04-11 网易(杭州)网络有限公司 Method and device for adding environmental sound source, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1120965A (en) * 1994-05-13 1996-04-24 松下电器产业株式会社 Game apparatus, voice selection apparatus, voice recognition apparatus and voice response apparatus
CN104801043A (en) * 2014-01-23 2015-07-29 腾讯科技(深圳)有限公司 Method and device for scene sound effect control
JP2016214462A (en) * 2015-05-18 2016-12-22 株式会社ユニバーサルエンターテインメント Gaming machine and performance assembly thereof
CN106843801A (en) * 2017-01-10 2017-06-13 福建省天奕网络科技有限公司 The approximating method and its system of audio

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6243595B2 (en) * 2012-10-23 2017-12-06 任天堂株式会社 Information processing system, information processing program, information processing control method, and information processing apparatus

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1120965A (en) * 1994-05-13 1996-04-24 松下电器产业株式会社 Game apparatus, voice selection apparatus, voice recognition apparatus and voice response apparatus
CN104801043A (en) * 2014-01-23 2015-07-29 腾讯科技(深圳)有限公司 Method and device for scene sound effect control
JP2016214462A (en) * 2015-05-18 2016-12-22 株式会社ユニバーサルエンターテインメント Gaming machine and performance assembly thereof
CN106843801A (en) * 2017-01-10 2017-06-13 福建省天奕网络科技有限公司 The approximating method and its system of audio

Also Published As

Publication number Publication date
CN108465241A (en) 2018-08-31

Similar Documents

Publication Publication Date Title
CN108465241B (en) Game sound reverberation processing method and device, storage medium and electronic equipment
US10542366B1 (en) Speaker array behind a display screen
US8784214B2 (en) Method and system for establishing location-based leaderboard
CN111111167B (en) Sound effect playing method and device in game scene and electronic device
WO2006058165A2 (en) Optimized rendering of dynamic moving bodies
US20120268468A1 (en) System and method for stochastically generating maps of places in a virtual space
CN114177613B (en) Navigation grid updating method, device, equipment and computer readable storage medium
US20230082928A1 (en) Virtual aiming control
JP2020507847A (en) Object moving method and apparatus, storage medium, and electronic device
CN111462339A (en) Display method and device in augmented reality, medium and electronic equipment
CN115063552A (en) Intelligent home layout method and device, intelligent home layout equipment and storage medium
US20170165576A1 (en) Control of audio effects using volumetric data
CN112206519B (en) Method, device, storage medium and computer equipment for realizing game scene environment change
CN105243268A (en) Game map positioning method and apparatus as well as user terminal
CN108744517B (en) Audio processing method, device, terminal and storage medium
JP6482193B2 (en) Video processing apparatus and method
CN116212374A (en) Model processing method, device, computer equipment and storage medium
KR20230125479A (en) Apparatus for simulating arrange of blocks
CN114307157A (en) Sound processing method, device, equipment and storage medium in virtual scene
CN110169087B (en) Redirecting audio output
US10009127B1 (en) Partitioning of surfaces of structures in propagation modeling
WO2022215136A1 (en) Information processing system, method for processing propagation environment data, and program
CN112699223B (en) Data searching method, device, electronic equipment and storage medium
US20220277495A1 (en) Method for determining collision range and related apparatus
CN115282601A (en) Game sound reverberation processing method and device, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant