WO2025201016A1 - 音效播放方法、声纹标识显示方法、装置及终端设备 - Google Patents

音效播放方法、声纹标识显示方法、装置及终端设备

Info

Publication number
WO2025201016A1
WO2025201016A1 PCT/CN2025/081591 CN2025081591W WO2025201016A1 WO 2025201016 A1 WO2025201016 A1 WO 2025201016A1 CN 2025081591 W CN2025081591 W CN 2025081591W WO 2025201016 A1 WO2025201016 A1 WO 2025201016A1
Authority
WO
WIPO (PCT)
Prior art keywords
sound
event
virtual object
area
effect
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.)
Pending
Application number
PCT/CN2025/081591
Other languages
English (en)
French (fr)
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.)
Tencent Technology (Shenzhen) Co Ltd
Original Assignee
Tencent Technology (Shenzhen) 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 Tencent Technology (Shenzhen) Co Ltd filed Critical Tencent Technology (Shenzhen) Co Ltd
Publication of WO2025201016A1 publication Critical patent/WO2025201016A1/zh
Anticipated expiration legal-status Critical
Pending legal-status Critical Current

Links

Classifications

    • A—HUMAN NECESSITIES
    • A63—SPORTS; GAMES; AMUSEMENTS
    • A63F—CARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00—Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/40—Processing input control signals of video game devices, e.g. signals generated by the player or derived from the environment
    • A63F13/42—Processing input control signals of video game devices, e.g. signals generated by the player or derived from the environment by mapping the input signals into game commands, e.g. mapping the displacement of a stylus on a touch screen to the steering angle of a virtual vehicle
    • A63F13/424—Processing input control signals of video game devices, e.g. signals generated by the player or derived from the environment by mapping the input signals into game commands, e.g. mapping the displacement of a stylus on a touch screen to the steering angle of a virtual vehicle involving acoustic input signals, e.g. by using the results of pitch or rhythm extraction or voice recognition
    • A—HUMAN NECESSITIES
    • A63—SPORTS; GAMES; AMUSEMENTS
    • A63F—CARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00—Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/50—Controlling the output signals based on the game progress
    • A63F13/53—Controlling the output signals based on the game progress involving additional visual information provided to the game scene, e.g. by overlay to simulate a head-up display [HUD] or displaying a laser sight in a shooting game
    • A63F13/533—Controlling the output signals based on the game progress involving additional visual information provided to the game scene, e.g. by overlay to simulate a head-up display [HUD] or displaying a laser sight in a shooting game for prompting the player, e.g. by displaying a game menu
    • A—HUMAN NECESSITIES
    • A63—SPORTS; GAMES; AMUSEMENTS
    • A63F—CARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00—Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/50—Controlling the output signals based on the game progress
    • A63F13/54—Controlling 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
    • A—HUMAN NECESSITIES
    • A63—SPORTS; GAMES; AMUSEMENTS
    • A63F—CARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00—Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/80—Special adaptations for executing a specific game genre or game mode
    • A63F13/822—Strategy games; Role-playing games
    • G—PHYSICS
    • G06—COMPUTING OR CALCULATING; COUNTING
    • G06F—ELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/16—Sound input; Sound output
    • G—PHYSICS
    • G06—COMPUTING OR CALCULATING; COUNTING
    • G06F—ELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/16—Sound input; Sound output
    • G06F3/165—Management of the audio stream, e.g. setting of volume, audio stream path
    • G—PHYSICS
    • G06—COMPUTING OR CALCULATING; COUNTING
    • G06F—ELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/16—Sound input; Sound output
    • G06F3/167—Audio in a user interface, e.g. using voice commands for navigating, audio feedback
    • A—HUMAN NECESSITIES
    • A63—SPORTS; GAMES; AMUSEMENTS
    • A63F—CARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F2300/00—Features 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/60—Methods for processing data by generating or executing the game program
    • A63F2300/6063—Methods for processing data by generating or executing the game program for sound processing
    • A63F2300/6072—Methods for processing data by generating or executing the game program for sound processing of an input signal, e.g. pitch and rhythm extraction, voice recognition
    • A—HUMAN NECESSITIES
    • A63—SPORTS; GAMES; AMUSEMENTS
    • A63F—CARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F2300/00—Features 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/60—Methods for processing data by generating or executing the game program
    • A63F2300/6063—Methods for processing data by generating or executing the game program for sound processing
    • A63F2300/6081—Methods for processing data by generating or executing the game program for sound processing generating an output signal, e.g. under timing constraints, for spatialization

Definitions

  • the embodiments of the present application relate to the field of computer technology, and in particular to a sound effect playback method, a voiceprint identification display method, an apparatus, and a terminal device.
  • the sound effects played by the game application heard by the user are only related to the distance and position of the virtual object, which results in the sound effects played by the game application being relatively simple.
  • the embodiments of the present application provide a sound effect playback method, a voiceprint identification display method, an apparatus, and a terminal device, which can enhance the richness of sound effect playback in game applications.
  • the technical solution is as follows:
  • a method for playing sound effects is provided, the method being executed by a terminal device, the method comprising:
  • the sound effect of the sound event is played after being weakened, wherein the visual occlusion area is used to produce an occlusion effect on the virtual elements in the area, and the weakening processing is used to weaken the effect of the sound effect for identifying the location of the first virtual object.
  • the voiceprint identifier corresponding to the sound event triggered by the first virtual object is displayed.
  • the degree of visual occlusion is used to indicate the degree of occlusion effect on the virtual elements in the area.
  • the voiceprint identifier is used to indicate the direction and position of the first virtual object.
  • the display interval duration between two adjacent voiceprint identifiers is positively correlated with the degree of visual occlusion of the area where the first virtual object is located.
  • An environment display module configured to display a virtual environment including the first virtual object
  • a terminal device which includes a processor and a memory, wherein a computer program is stored in the memory, and the computer program is loaded and executed by the processor to implement the above-mentioned sound effect playback method or the above-mentioned voiceprint identification display method.
  • FIG1 is a schematic diagram of a virtual environment provided by an embodiment of the present application.
  • FIG6 is a schematic diagram of a configuration interface provided by another embodiment of the present application.
  • FIG10 is a schematic diagram of a visual occlusion area provided by another embodiment of the present application.
  • FIG13 is a block diagram of a terminal device provided by an embodiment of the present application.
  • sub-figure (a) of FIG1 during the movement of virtual object 11, if virtual object 11 is located in area 12 outside the smoke range of the smoke bomb, the initial sound effect corresponding to each movement of virtual object 11 is played directly. As shown in sub-figure (b) of FIG1 , if virtual object 11 is located within area 13 covered by the smoke generated by the smoke bomb, the initial sound effect corresponding to the movement is weakened to obtain a weakened sound effect corresponding to the movement, and the weakened sound effect corresponding to the movement is played.
  • FIG2 shows a schematic diagram of a computer system provided by an embodiment of the present application, wherein the computer system can be implemented as a sound effect playback system.
  • the system 200 may include: a terminal device 14 .
  • the target application is installed and running in the terminal device 14, such as the client of the target application.
  • a user account is logged in to the client.
  • the terminal device is an electronic device with data calculation, processing and storage capabilities.
  • the terminal device can be a smart phone, tablet computer, PC (Personal Computer), wearable device, etc., and the embodiment of the present application is not limited to this.
  • the target application can be a game application, such as a shooting game application, a multiplayer gun battle survival game application, a battle royale survival game application, an LBS (Location Based Service) game application, a MOBA (Multiplayer Online Battle Arena) game application, etc., and the embodiment of the present application is not limited to this.
  • the target application can also be any application with a sound effect playback function, such as a social application, a payment application, a video application, a music application, a shopping application, a news application, etc.
  • the execution subject of each step can be the terminal device 14, such as a client running in the terminal device 14.
  • the system 200 further includes a server 15, which establishes a communication connection (such as a network connection) with the terminal device 14, and the server 15 is used to provide background services for the target application.
  • the server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud computing services.
  • the execution subject of each step can be the terminal device 14; the various steps of the embodiment of the present application can also be performed alternately by the terminal device 14 and the server 15.
  • Step 310 Display a virtual environment including a first virtual object.
  • the virtual object controlled by the user account logged in to the client introduced above may be a second virtual object in the virtual environment.
  • the second virtual object and the first virtual object are different virtual objects participating in the same game and located in the same virtual environment.
  • the terminal device 14 introduced above is used to display the virtual environment observed through the perspective of controlling the second virtual object (including other virtual objects in the virtual environment, such as the first virtual object), and to play sound effects in the virtual environment that simulate the sound effects heard by the second virtual object, that is, the user can hear the sound effects in the virtual environment by controlling the second virtual object.
  • the first virtual object and the second virtual object may belong to the same camp, the same team, the same organization, have a friend relationship, or have temporary communication permissions.
  • the second virtual object is considered to be a friendly virtual object of the first virtual object.
  • the first virtual object and the second virtual object may belong to different camps, different teams, different organizations, or have a hostile relationship.
  • the second virtual object is considered to be an enemy virtual object of the first virtual object.
  • the clients installed on the first terminal device and the second terminal device are the same, or the clients installed on the two terminals are the same type of clients on different operating system platforms (Android or iOS).
  • the first terminal device may generally refer to one of a plurality of terminal devices, and the second terminal device may generally refer to another one of the plurality of terminal devices. This embodiment only takes the first terminal device and the second terminal device as examples.
  • a virtual object can also be a virtual prop, wherein a virtual prop can include a virtual vehicle (such as a virtual car, a virtual aircraft, a virtual motorcycle, a virtual bicycle, a virtual boat, a virtual skateboard, etc.), a virtual attack prop (such as a virtual shooting prop, a virtual knife, a virtual throwing prop, etc.), a virtual sound prop (such as a virtual speaker, a virtual speaker, a virtual whistle, a virtual musical instrument, etc.), etc.
  • a virtual prop can include a virtual vehicle (such as a virtual car, a virtual aircraft, a virtual motorcycle, a virtual bicycle, a virtual boat, a virtual skateboard, etc.), a virtual attack prop (such as a virtual shooting prop, a virtual knife, a virtual throwing prop, etc.), a virtual sound prop (such as a virtual speaker, a virtual speaker, a virtual whistle, a virtual musical instrument, etc.), etc.
  • a virtual prop can include a virtual vehicle (such as a virtual car,
  • the first is a first-person perspective, in which a virtual camera is mounted on the head of a second virtual object.
  • the image obtained by observing the virtual environment through this virtual camera serves as the displayed virtual environment image.
  • the displayed virtual environment image does not include the second virtual object.
  • the second is a third-person perspective, in which a virtual camera is mounted behind the second virtual object.
  • the image obtained by observing the virtual environment through this virtual camera serves as the displayed virtual environment image.
  • the displayed virtual environment image may include part or all of the second virtual object.
  • the orientation of both the first-person and third-person perspectives changes with the orientation of the first virtual object.
  • the third is another perspective with a specific direction, in which the orientation of this perspective does not change.
  • the image obtained by observing the entire virtual environment from a specific direction through the virtual camera serves as the displayed virtual environment image.
  • the second virtual object can be displayed in the center of the virtual environment image, elsewhere in the virtual environment image, or not at all in the virtual environment image, although this application does not limit this.
  • Step 320 when the first virtual object is located in a visual occlusion area in the virtual environment and the first virtual object triggers a sound event in the visual occlusion area, play the sound effect of the sound event after weakening processing, wherein the visual occlusion area is used to produce an occlusion effect on the virtual elements in the area, and the weakening processing is used to weaken the effect of the sound effect on identifying the location of the first virtual object.
  • a visually blocked area is an area that visually blocks virtual elements within the area.
  • the visually blocked area does not alter the existing virtual elements within the area.
  • the visually blocked area is an element superimposed on top of the existing virtual elements within the area to block the virtual elements.
  • visual blocking includes, but is not limited to, fog, rain, snow, and the like.
  • the visual occlusion area is used to produce an occlusion effect on the virtual elements in the area.
  • the occlusion effect here may refer to the occlusion of clarity.
  • the occlusion effect here includes at least one of the following: making the virtual elements in the area change from a visible state to an invisible state, making the virtual elements in the area change from a clearly visible state to a fuzzy visible state.
  • the visible state refers to a state in which the user can see the virtual element on the user interface.
  • the invisible state refers to a state in which the user cannot see the virtual element on the user interface.
  • the clearly visible state refers to a state in which the clarity of the virtual element seen by the user on the user interface is greater than or equal to a preset value.
  • the fuzzy visible state refers to a state in which the clarity of the virtual element seen by the user on the user interface is less than a preset value.
  • the visual occlusion area is an area at a preset location in the virtual environment or a dynamically triggered area.
  • the location of the visual occlusion area is preset by the developer.
  • the area or size of the visual occlusion area is preset.
  • the visual occlusion area is a spherical area with a preset radius centered at the target location.
  • the visual occlusion area is a dynamically triggered area in the virtual environment, it can be dynamically triggered by a virtual object or virtual prop.
  • the visual occlusion area centered at the target location is triggered.
  • the visual trigger area is dynamically triggered with the throwing location of the virtual prop in the virtual environment as the center.
  • the area of the visual trigger area is dynamically determined based on the usage of the virtual prop in the virtual environment.
  • the longer the virtual prop is used the larger the area of the visual trigger area. For example, when the duration of use of the virtual prop is shorter, the area of the visual triggering region is smaller.
  • the virtual environment may include a visual occlusion region that can completely visually block virtual elements within the visual occlusion region. If the visual occlusion region completely blocks the visual elements within the visual occlusion region, virtual objects outside the visual occlusion region will be completely unable to see any virtual elements within the visual occlusion region, and will also be completely unable to see the first virtual object within the visual occlusion region.
  • a virtual element in a region refers to a virtual element that existed before a visually obstructed region appeared in the region.
  • the virtual element includes a virtual object, a virtual environment, a virtual vehicle, and the like.
  • the virtual element can be movable or immovable.
  • the first virtual object is located within the visual occlusion area, and the second virtual object is located outside the visual occlusion area. Therefore, when the first virtual object is located within the visual occlusion area, the second virtual object cannot see the first virtual object; that is, the first virtual object is not displayed on the client controlling the second virtual object (such as the client described above).
  • a sound event refers to an event that emits a sound and has a corresponding playable sound effect.
  • a sound event can be a position movement event, such as a crawling event, a walking event, a running event, a jumping event, a climbing event, a driving vehicle event, a swimming event, etc.; in some embodiments, a sound event can also be an attack event, such as a fighting event (i.e., a bare-handed fighting event without using attack props) or a shooting event; in some embodiments, a sound event can also be a contact event, such as an event in which a first virtual object collides or rubs against other virtual elements in the virtual environment (such as stones, tables and chairs, buildings, haystacks, the ground, or other virtual objects other than the first virtual object).
  • the number of sound events is one or at least two. Exemplarily, only one sound event is allowed to be triggered for the same virtual object at the same time. Exemplarily, at least two sound events are allowed to be triggered for the same virtual object at the same time. Exemplarily, each of the at least one sound event is required to be attenuated, and the attenuated sound effect is played. Exemplarily, each time a sound event is triggered, the attenuated sound effect of the sound event is played once.
  • different numbers of sound events correspond to different numbers of sound effects after attenuation processing.
  • the number of sound events is at least two.
  • the number of sound effects after the sound events have been weakened is also at least two.
  • the weakening process is performed on each of the at least two sound events to obtain the at least two weakened sound effects.
  • the number of weakened sound effects is the same as the number of sound events.
  • the weakening process can also be called blurring, that is, the sound effect obtained after the blurring process is used to blur the judgment of the location of the virtual object.
  • the attenuation process can be completed in advance, and the attenuated sound effect can be used as the preset sound effect.
  • the attenuated sound effect can be used as the preset sound effect.
  • the weakening process can be performed by the client described above or by the backend server described above, and this embodiment of the present application does not specifically limit this.
  • this embodiment of the present application does not specifically limit this.
  • the real-time position of the first virtual object (including time and object position coordinates) is obtained.
  • the real-time position of the visually occluded area is obtained (including time and area position coordinates).
  • the time when the first virtual object triggers a sound event is obtained.
  • the visual occlusion area includes the effective area of the smoke generated by the virtual smoke device in the virtual environment, or the coverage area, and the center point of the bottom surface of the coverage area is the position where the virtual smoke device generates the smoke.
  • the coverage area of the smoke is greater than or equal to the effective area of the smoke.
  • the edge position of the coverage area of the smoke is considered to be the non-effective area of the smoke.
  • the effective area corresponding to the coverage area of the smoke is set in advance.
  • the entire coverage area of the smoke is considered to be the effective area of the smoke.
  • a partial coverage area of the entire coverage area of the smoke is considered to be the effective area of the smoke.
  • the area in the entire coverage area of the smoke whose distance to the edge position of the entire coverage area is greater than or equal to a preset value is used as the effective area of the smoke.
  • the virtual smoke device can be a smoke bomb, which is a prop that can generate smoke after being detonated.
  • the smoke generated by the smoke bomb spreads into the space of the virtual environment to form the above-mentioned coverage area.
  • the smoke bomb can be detonated by the first virtual object or other virtual objects of the team where the first virtual object is located.
  • the second virtual object can be a virtual object of the team where the first virtual object is located, or it can be a virtual object that has a competitive or hostile relationship with the first virtual object. The embodiments of the present application do not specifically limit this.
  • the coverage area can be an area of any shape such as a rectangular parallelepiped, a sphere, a hemisphere, or a cylinder.
  • the length (which can be expressed as X), width (which can be expressed as Y), and height (which can be expressed as Z) of the coverage area can be configured through the smoke bomb configuration interface 40.
  • the length, width, and height of the configuration coverage area can be 600 cm, 600 cm, and 300 cm, respectively.
  • step 320 can be replaced by: when the first virtual object is located in the coverage area of smoke in the virtual environment, and the first virtual object triggers at least one sound event in the coverage area, playing the sound effect of at least one sound event after weakening processing, wherein the coverage area is used to visually block the virtual elements in the area, and the weakening processing is used to weaken the effect of the sound effect for identifying the location of the first virtual object.
  • the visually blocked area may also be an area filled with fog in the virtual environment, an area with a sandstorm in the virtual environment, an area without light or with dim light in the virtual environment, or an area where it is raining in the virtual environment.
  • the embodiments of the present application do not specifically limit this.
  • Step 510 Display a virtual environment including a first virtual object.
  • the initial sound effect of the sound event has spatial stereoscopic properties, that is, the user can identify the sound location of the sound event based on the initial sound effect of the sound event, that is, identify the location where the first virtual object triggers the sound event.
  • the initial sound effect of the sound event has a good effect on identifying the sound location of the sound event.
  • the initial sound effect parameters of the sound event triggered by the first virtual object can be adjusted (i.e., weakened) to obtain the sound effect of the sound event after the weakening process, that is, the sound effect of the sound event after the weakening process is obtained.
  • the effect of the initial sound effect of the sound event on distinguishing the sound location of the sound event i.e., the effect of the sound effect of the sound event after the weakening process on distinguishing the sound location of the sound event
  • the effect of the initial sound effect of the sound event on distinguishing the sound location of the sound event is higher than the effect of the sound effect of the sound event after the weakening process on distinguishing the sound location of the sound event, thereby weakening the effect and role of the final sound effect in locating the first virtual object, and increasing the difficulty for the user corresponding to the second virtual object to determine the first virtual object through the sound effect of at least one sound event.
  • an initial sound effect corresponding to the first sound event is weakened to obtain weakened sound effect parameters corresponding to the first sound event.
  • the first sound event is any one of the at least one sound event.
  • performing attenuation processing on the initial sound effect corresponding to the sound event to obtain attenuated sound effect parameters corresponding to the sound event includes at least one of the following: performing attenuation processing on the volume value of the initial sound effect corresponding to the sound event to obtain the attenuated volume value corresponding to the sound event; performing attenuation processing on the spatial parameters of the initial sound effect corresponding to the sound event to obtain the attenuated spatial parameters corresponding to the sound event; performing attenuation processing on the audio value of the initial sound effect corresponding to the sound event to obtain the attenuated audio value corresponding to the sound event; performing attenuation processing on the timbre of the initial sound effect corresponding to the sound event to obtain the attenuated timbre corresponding to the sound event.
  • Step 540 Play the sound effect of the sound event according to the weakened sound effect parameters of the sound event.
  • the attenuated sound effect parameter includes at least one of an attenuated volume value, an attenuated spatial parameter, an attenuated audio value, and an attenuated timbre.
  • the sound effects of the sound event are played according to one or more of the attenuated volume value, the attenuated spatial parameters, the attenuated audio value, and the attenuated timbre of the sound event. In some embodiments, the sound effects of the sound event are played according to the attenuated volume value of the sound event. In some embodiments, the sound effects of the sound event are played according to the attenuated spatial parameters of the sound event. In some embodiments, the sound effects of the sound event are played according to the attenuated audio value of the sound event. In some embodiments, the sound effects of the sound event are played according to the attenuated timbre of the sound event.
  • the sound events are directly configured on the timeline of the animation file of the first virtual object's movement. As shown in Figure 6, if the sound event is a position movement, each movement of the first virtual object will synchronously trigger a footstep event on timeline 61 that plays a corresponding sound effect, such as the footstep event corresponding to footstep 62 or the footstep event corresponding to footstep 63.
  • the difficulty for the user corresponding to the second virtual object to determine the first virtual object through the sound effect of the sound event is increased, thereby improving the masking effect of the visual occlusion area on the virtual object located therein.
  • the volume value may also be referred to as a loudness value.
  • the unit of the volume value is decibel (dB).
  • the initial volume value of the first sound event is weakened according to the set volume difference. That is, the volume value of the first sound event after weakening is obtained by subtracting the volume difference from the initial volume value of the first sound event.
  • the volume difference may be 3dB, 4dB, and so on.
  • the volume difference may also be other values, and the specific value of the volume difference may be set by relevant technical personnel according to actual conditions, and the embodiments of the present application do not specifically limit this.
  • the first sound event since the virtual environment is merely a simulation of the real world, the first sound event does not actually occur.
  • the sound effect of the first sound event is played through the built-in audio playback device of the terminal device or through the external audio playback device of the terminal device, and the spatial parameters can be used to simulate the direction and distance of the sound position relative to the second virtual object in the virtual environment.
  • the spatial parameters of the initial sound effect of the first sound event have a good effect on distinguishing the direction and distance of the first sound position relative to the second virtual object.
  • the spatial parameters include the time difference and volume difference between the sound effects of at least two channels; based on the initial spatial parameters of the first sound event, determining the spatial parameters after the first sound event is weakened includes: based on the initial time difference or volume difference between the sound effects of at least two channels of the first sound event, determining the time difference or volume difference after the first sound event is weakened.
  • the sound effect of the first sound event includes multiple channels of audio tracks, and each audio track can be played by a corresponding channel.
  • the first sound event may correspond to a left channel audio track and a right channel audio track.
  • the time difference and volume difference between the multiple channels included in the spatial parameters can be used to simulate the effect of the sound emitted by the first sound event at the corresponding position and propagating to the two ears of the second virtual object. Therefore, by adjusting the initial time difference or volume difference between the sound effects of each of the multiple channels, the sound effect for distinguishing the location of the first virtual object can be weakened, thereby achieving the weakening of the sound effect of the sound event.
  • the time difference or volume difference after a sound event is attenuated is determined based on the initial time difference or volume difference between the sound effects of at least two channels of the sound event.
  • the initial time difference between the sound effects of the first channel and the second channel is obtained, where the first channel and the second channel are any two different channels among the at least two channels.
  • the initial time difference between the sound effects of the first channel and the second channel is reduced to obtain the time difference after attenuation.
  • the reduction in the time difference is a preset value or ratio.
  • the initial volume difference between the sound effects of the first channel and the second channel is obtained, where the first channel and the second channel are any two different channels among the at least two channels.
  • the initial volume difference between the sound effects of the first channel and the second channel is reduced to obtain the volume difference after attenuation.
  • the reduction in the volume difference is a preset value or ratio.
  • the time difference or volume difference after the sound event is attenuated is used as the spatial parameter of the sound event after attenuation.
  • the expressiveness of the sound effect of the sound event on the sound position is blurred to a certain extent, thereby weakening the sound effect for identifying the position of the first virtual object.
  • the time difference or volume difference after attenuation is determined as the spatial parameter of the sound event after attenuation.
  • the step of determining whether the first sound event belongs to a sound effect playback event or a sound effect hiding event can be performed by the client or by the server, and the embodiments of the present application do not impose specific restrictions on this.
  • the frequency limit information includes at least one of the following:
  • the number of sound effect playback events is less than or equal to a first threshold.
  • the frequency of playing sound effects of sound events is limited by limiting the number of sound events that can be determined as sound effect playing events within the first duration. In some embodiments, when the number of sound events triggered within the first duration is less than or equal to the first threshold, all sound events triggered within the first duration are sound effect playing events, and the corresponding sound effects need to be played; when the number of sound events triggered within the first duration is greater than the first threshold, in accordance with the triggering time sequence, the first threshold number of sound events triggered first within the first duration are sound effect playing events, and all sound events within the first duration that exceed the first threshold are sound effect hiding events.
  • the frequency limit information includes: when the first virtual object is located in the visual occlusion area, only the footsteps (i.e., sound effects) of the first virtual object's two position movements (i.e., triggering sound events) are allowed to be played within 5 seconds. Then, within these 5 seconds, the first and second position movements of the first virtual object are sound effect playback events, and the footsteps corresponding to the first and second position movements of the first virtual object need to be played; within these 5 seconds, the footsteps of the third and subsequent position movements will not be played, that is, the user corresponding to the second virtual object will not hear the footsteps of the third and subsequent position movements.
  • a sound event triggered by the first virtual object it is determined according to a rule whether the sound event is a sound effect playing event.
  • the last m sound events in every n consecutive sound events are determined to be sound effect play events, and the sound events preceding the m sound events in the n consecutive sound events are determined to be sound effect hide events. For example, if n is 5 and m is 3, then at least one sound event, in the order of triggering time, is: sound effect play event, sound effect play event, sound effect hide event, sound effect hide event, sound effect hide event; sound effect play event, sound effect play event, sound effect hide event, sound effect hide event, sound effect hide event, sound effect hide event...
  • a stochastic model can be used to determine whether the sound event is a sound effect play event or a sound effect hide event. For example, for sound event A, if the stochastic model output is "1,” then sound event A is a sound effect play event; if the stochastic model output is "0,” then sound event A is a sound effect hide event.
  • the number of sound events that play corresponding sound effects is less than the number of sound events actually triggered by virtual objects, thereby reducing the exposure of the first virtual object to the sound events it triggers.
  • Other virtual objects (such as the second virtual object) can only judge the position or movement path of the first virtual object through a smaller number of sound effects, thereby enhancing the masking effect of the visual occlusion area on the first virtual object.
  • Step 710 When the first virtual object enters the coverage area, if the first virtual object triggers a position movement event, determine whether the smoke bomb duration event has arrived. If so, execute step 720; if not, execute step 730;
  • Step 720 Play the initial sound effect of the position movement event
  • the visual occlusion region includes at least two sub-regions. Within a sub-region, the degree of visual occlusion is uniform, but different sub-regions may have different degrees of visual occlusion. In some embodiments, the degree of visual occlusion indicates the occlusion effect on elements within the visual occlusion region. In some embodiments, sub-regions with higher degrees of visual occlusion have a greater attenuation effect on the sound effects of sound events, while sub-regions with lower degrees of visual occlusion have a lesser attenuation effect on the sound effects of sound events.
  • sub-regions with higher degrees of visual occlusion have a greater visual occlusion effect and a greater attenuation effect on the virtual elements located therein, while sub-regions with lower degrees of visual occlusion have a lesser attenuation effect on the virtual elements located therein.
  • the first virtual object's figure can still be vaguely seen.
  • the first virtual object is located in subarea 82, the first virtual object is completely invisible. In other words, the subarea completely obscures the first virtual object within it.
  • the volume of footsteps generated by the first virtual object moving within subarea 82 is lower than the volume of footsteps generated by the first virtual object moving within subarea 81 or subarea 83.
  • the event type of the third sound event is obtained.
  • the weakening processing method corresponding to the event type of the third sound event is found.
  • initial sound effect parameters of the third sound event are weakened to obtain weakened sound effect parameters.
  • the sound effects of the third sound event are played according to the weakened sound effect parameters of the third sound event.
  • the third sound event is any sound event among the at least one sound event.
  • the first weakening process is a weakening process corresponding to a position movement type sound event.
  • the second weakening process is a weakening process corresponding to an attack type sound event.
  • the first weakening process and the second weakening process are two different weakening processes preset in advance.
  • the degree of weakening of the sound effect by the first weakening process is greater than the degree of weakening of the sound effect by the second weakening process.
  • the degree of weakening of the volume value of the sound effect by the first weakening process is greater than the degree of weakening of the volume value of the sound effect by the second weakening process.
  • step 910 can refer to the content of step 310 in the embodiment of Figure 3 above, and will not be repeated here.
  • areas of smoke or fog, rainy areas, or areas without or lacking light in the virtual environment may limit or hinder the user's visual observation of the virtual environment. This degree of limitation or hindrance is referred to as visual occlusion.
  • the degree of visual occlusion may vary between different areas of the virtual environment. In some embodiments, the degree of visual occlusion may also vary between the same area in the virtual environment at different time periods.
  • the degree of visual obstruction in different areas or at different times within an area can be preconfigured, such as by using a parameter value ranging from 0 to 100% to represent the degree of visual obstruction.
  • a parameter value ranging from 0 to 100% to represent the degree of visual obstruction.
  • the degree of visual obstruction can be 100%; for an area covered by fog, the degree of visual obstruction can be 60%; and for an area that does not obstruct vision (i.e., a non-visually obstructed area), the degree of visual obstruction can be 0.
  • the display interval duration corresponding to the first time period is greater than the display interval duration corresponding to the second time period; and the display interval duration corresponding to the second time period is greater than the display interval duration corresponding to the time period after the second time period.
  • the display interval duration corresponding to the first time period may be 3 seconds
  • the display interval duration corresponding to the second time period may be 2 seconds
  • the display interval duration after the second time period may be 1 second.
  • the degree of visual occlusion may be different at different locations or in different sub-areas within the visual occlusion area. If the first virtual object is within the visual occlusion area, the location of the first virtual object triggering the sound event is first obtained, such as the coordinates of the first virtual object when the sound event was triggered. The sub-area where the first virtual object was located when the sound event was triggered can be determined based on the coordinates. The display interval duration corresponding to the degree of visual occlusion in the sub-area is determined as the first interval duration, so that the voiceprint identifier of the sound event triggered in the sub-area can be displayed according to the first interval duration.
  • sub-area 102 From closest to farthest distance from landing location 101, they are sub-area 102, sub-area 103, and sub-area 104. Obviously, the visual obstruction level of sub-area 102 is greater than that of sub-area 103, and the visual obstruction level of sub-area 103 is greater than that of sub-area 104.
  • the duration of the voiceprint identifier display interval can also be different in the visually blocked area, thereby enriching the differentiation of different areas of the visually blocked area and enriching the functionality of the visually blocked area.
  • combining the display of the voiceprint identifier with different sub-areas of the visually blocked area makes the voiceprint identifier more diverse in its display to the user.
  • the technical solution provided by the embodiments of the present application limits the display interval of the voiceprint logo according to the degree of visual occlusion, so that the higher the degree of visual occlusion in the area, the lower the display frequency of the voiceprint logo, and the lower the degree of visual occlusion in the area, the higher the display frequency of the voiceprint logo.
  • step 920 can be replaced by the following steps:
  • amplitude is negatively correlated with distance, and negatively correlated with visual obstruction.
  • the direction indicated by the position corresponding to the voiceprint identifier on the compass and the difference between the direction of the sound event corresponding to the voiceprint identifier relative to the second virtual object are the direction difference, and the direction difference is positively correlated with the degree of visual occlusion of the area where the first virtual object is located.
  • FIG 11 shows a block diagram of a sound effect playback device provided by one embodiment of the present application.
  • This device has the function of implementing the above-mentioned example of the sound effect playback method.
  • the function can be implemented by hardware or by hardware executing corresponding software.
  • This device can be the terminal device described above, or it can be set on a terminal device.
  • the device 1100 may include: an environment display module 1110 and a sound effect playback module 1120.
  • the sound effect playing module 1120 includes: a parameter acquisition submodule and a sound effect playing submodule.
  • the parameter acquisition submodule is used to obtain the initial sound effect parameters of the sound event.
  • the spatial parameters include the time difference and volume difference between the sound effects of at least two channels; the parameter acquisition submodule is used to: determine the time difference or volume difference after the sound event is weakened based on the initial time difference or volume difference between the sound effects of the at least two channels of the first sound event.
  • the parameter acquisition submodule is used to: determine whether the first sound event is a sound effect playback event or a sound effect hiding event based on frequency limit information corresponding to the visual occlusion area, the frequency limit information is used to limit the frequency of playing the sound effect of the sound event, the sound effect playback event refers to a sound event of playing the corresponding sound effect, and the sound effect hiding event refers to a sound event of hiding the corresponding sound effect;
  • the frequency limit information includes at least one of the following:
  • the number of the sound effect playback events is less than or equal to a first threshold
  • n and m are integers greater than 1, and m is less than n;
  • the sound effect playing event or the sound effect hiding event is determined randomly.
  • the visual occlusion area includes a coverage area of smoke generated by a virtual smoke device in the virtual environment, and a center point of a bottom surface of the coverage area is a position where the virtual smoke device generates the smoke.
  • the visual occlusion area includes at least two sub-areas with different degrees of visual occlusion, and the degrees of visual occlusion at different positions in the same sub-area are the same; when the sound position of the sound event is located in the first sub-area of the at least two sub-areas, the sound effect of the sound event after weakening processing is determined based on the degree of visual occlusion of the first sub-area; wherein, the weakening effect of the sound effect of the sound event after weakening processing on distinguishing the position of the first virtual object is positively correlated with the degree of visual occlusion.
  • the sound effect is only weakened, not completely cancelled, and the position of the first virtual object can still be perceived based on the sound effect.
  • the weakened sound effect played makes the position of the first virtual object more difficult to distinguish, while improving the richness of the sound effect, enriching the form of human-computer interaction and enhancing the fun of the game.
  • the visual occlusion area can not only visually block the virtual objects located in the visual occlusion area, but also auditorily blur the position of the virtual objects by weakening the sound effects, thereby enriching the function of the visual occlusion area.
  • the environment display module 1210 is configured to display a virtual environment including a first virtual object.
  • the identification display module 1220 is used to display the voiceprint identification corresponding to the sound event triggered by the first virtual object based on the degree of visual occlusion of the area where the first virtual object is located.
  • the degree of visual occlusion is used to indicate the degree of occlusion effect on the virtual elements in the area.
  • the voiceprint identification is used to indicate the direction and position of the first virtual object.
  • the display interval duration between two adjacent voiceprint identifications is positively correlated with the degree of visual occlusion of the area where the first virtual object is located.
  • the identification display module 1220 is used to:
  • the first virtual object When the first virtual object is located in a visual occlusion area of the virtual environment, displaying the voiceprint identifier at a first interval, wherein the visual occlusion area is used to produce an occlusion effect on virtual elements within the area;
  • the first virtual object When the first virtual object is located in a non-visually blocked area of the virtual environment, displaying the voiceprint identifier according to a second interval duration, wherein the non-visually blocked area is an area other than the visually blocked area;
  • the visual occlusion degree of the visually occluded area is higher than the visual occlusion degree of the non-visually occluded area, and the first interval duration is greater than the second interval duration.
  • the identification display module 1220 is used to:
  • the display interval duration corresponding to the sub-region where the first virtual object is located when triggering the sound event is determined as the first interval duration, and the voiceprint identifier is displayed according to the first interval duration.
  • the identification display module 1220 is used to:
  • the direction indicated by the voiceprint identifier corresponding to the position on the compass, and the difference between the direction of the sound event corresponding to the voiceprint identifier relative to the second virtual object is the direction difference, and the direction difference is positively correlated with the degree of visual occlusion of the area where the first virtual object is located.
  • the technical solution provided by the embodiments of the present application limits the display interval of the voiceprint logo according to the degree of visual occlusion, so that the higher the degree of visual occlusion in the area, the lower the display frequency of the voiceprint logo, and the lower the degree of visual occlusion in the area, the higher the display frequency of the voiceprint logo.
  • the apparatus provided in the above embodiments when implementing its functions, is only illustrated by the division of the above functional modules.
  • the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
  • the apparatus and method embodiments provided in the above embodiments are based on the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.
  • FIG. 13 shows a block diagram of a terminal device 1300 provided in one embodiment of the present application.
  • the terminal device 1300 can be an electronic device such as a mobile phone, tablet computer, game console, e-book reader, multimedia playback device, wearable device, PC, etc.
  • the terminal device is used to implement the sound effect playback method or voiceprint identification display method provided in the above embodiments.
  • the terminal device can be the terminal device 14 in the computer system shown in Figure 2. Specifically:
  • the terminal device 1300 includes a processor 1301 and a memory 1302 .
  • the processor 1301 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc.
  • the processor 1301 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field Programmable Gate Array), or PLA (Programmable Logic Array).
  • the processor 1301 may also include a main processor and a coprocessor.
  • the main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state.
  • the processor 1301 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen.
  • the processor 1301 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.
  • AI Artificial Intelligence
  • Memory 1302 may include one or more computer-readable storage media, which may be non-transitory. Memory 1302 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory storage devices. In some embodiments, the non-transitory computer-readable storage media in memory 1302 is used to store a computer program and is configured to be executed by one or more processors to implement the above-mentioned sound effect playback method or voiceprint identification display method.
  • terminal device 1300 may optionally include a peripheral device interface 1303 and at least one peripheral device.
  • the processor 1301, memory 1302, and peripheral device interface 1303 may be connected via a bus or signal lines.
  • Each peripheral device may be connected to peripheral device interface 1303 via a bus, signal lines, or circuit boards.
  • the peripheral device may include at least one of a radio frequency circuit 1304, a display screen 1305, an audio circuit 1306, and a power supply 1307.
  • a computer-readable storage medium is further provided, wherein a computer program is stored in the storage medium.
  • the computer program When the computer program is executed by a processor, the computer program implements the above-mentioned sound effect playing method or the above-mentioned voiceprint identification display method.
  • the computer-readable storage medium may include: ROM (Read-Only Memory), RAM (Random-Access Memory), SSD (Solid State Drives), or an optical disk, etc.
  • the random access memory may include ReRAM (Resistance Random Access Memory) and DRAM (Dynamic Random Access Memory).
  • a computer program product comprising a computer program stored in a computer-readable storage medium.
  • a processor of a computer device reads the computer program from the computer-readable storage medium and executes the computer program, causing the computer device to perform the aforementioned sound effect playback method or the aforementioned voiceprint identification display method.
  • this application can display a prompt interface, pop-up window or output voice prompt information.
  • the prompt interface, pop-up window or voice prompt information is used to remind the user that its relevant data is currently being collected, so that this application only starts to execute the relevant steps of obtaining the user's relevant data after obtaining the user's confirmation operation on the prompt interface or pop-up window. Otherwise (that is, when the user's confirmation operation on the prompt interface or pop-up window is not obtained), the relevant steps of obtaining the user's relevant data are terminated, that is, the user's relevant data is not obtained.
  • all user data collected by this application are collected with the user's consent and authorization, and the collection, use and processing of relevant user data need to comply with the relevant laws, regulations and standards of the relevant countries and regions.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Acoustics & Sound (AREA)
  • General Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Optics & Photonics (AREA)
  • Stereophonic System (AREA)

Abstract

一种音效播放方法、声纹标识显示方法、装置及终端设备,涉及计算机技术领域。该音效播放方法包括:显示包含有第一虚拟对象的虚拟环境;在第一虚拟对象位于虚拟环境中的视觉遮挡区域内、且第一虚拟对象在视觉遮挡区域内触发发声事件的情况下,播放发声事件经过削弱处理后的音效,其中,视觉遮挡区域用于对区域内的虚拟元素产生遮挡效果,削弱处理用于削弱音效对于辨别第一虚拟对象所在位置的效果。本申请实施例提供的技术方案,能够提升游戏应用程序中音效播放的丰富性。

Description

音效播放方法、声纹标识显示方法、装置及终端设备
本申请要求于2024年03月27日提交的申请号为202410376871.7、发明名称为“音效播放方法、声纹标识显示方法、装置及终端设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请实施例涉及计算机技术领域,特别涉及一种音效播放方法、声纹标识显示方法、装置及终端设备。
背景技术
随着应用程序开发技术的发展,游戏应用程序中的音效也越来越丰富多样。
在相关技术中,用户听到的游戏应用程序播放的音效,如虚拟对象在虚拟环境中的脚步声,仅与虚拟对象的距离和位置有关,这样就导致游戏应用程序播放的音效较为单一。
发明内容
本申请实施例提供了一种音效播放方法、声纹标识显示方法、装置及终端设备,能够提升游戏应用程序中音效播放的丰富性。该技术方案如下:
根据本申请实施例的一个方面,提供了一种音效播放方法,所述方法由终端设备执行,所述方法包括:
显示包含有第一虚拟对象的虚拟环境;
在所述第一虚拟对象位于所述虚拟环境中的视觉遮挡区域内、且所述第一虚拟对象在所述视觉遮挡区域内触发发声事件的情况下,播放所述发声事件经过削弱处理后的音效,其中,所述视觉遮挡区域用于对区域内的虚拟元素产生遮挡效果,所述削弱处理用于削弱音效对于辨别所述第一虚拟对象所在位置的效果。
根据本申请实施例的一个方面,提供了一种声纹标识显示方法,所述方法由终端设备执行,所述方法包括:
显示包含有第一虚拟对象的虚拟环境;
基于所述第一虚拟对象所在区域的视觉遮挡程度,显示所述第一虚拟对象触发的发声事件对应的声纹标识,所述视觉遮挡程度用于指示对区域内的虚拟元素产生的遮挡效果的程度,所述声纹标识用于表示所述第一虚拟对象的方向和位置,相邻两个声纹标识之间的显示间隔时长,与所述第一虚拟对象所在区域的视觉遮挡程度呈正相关关系。
根据本申请实施例的一个方面,提供了一种音效播放装置,所述装置包括:
环境显示模块,用于显示包含有第一虚拟对象的虚拟环境;
音效播放模块,用于在所述第一虚拟对象位于所述虚拟环境中的视觉遮挡区域内、且所述第一虚拟对象在所述视觉遮挡区域内触发发声事件的情况下,播放所述发声事件经过削弱处理后的音效,其中,所述视觉遮挡区域用于对区域内的虚拟元素产生遮挡效果,所述削弱处理用于削弱音效对于辨别所述第一虚拟对象所在位置的效果。
根据本申请实施例的一个方面,提供了一种声纹标识显示装置,所述装置包括:
环境显示模块,用于显示包含有第一虚拟对象的虚拟环境;
标识显示模块,用于基于所述第一虚拟对象所在区域的视觉遮挡程度,显示所述第一虚拟对象触发的发声事件对应的声纹标识,所述视觉遮挡程度用于指示对区域内的虚拟元素产生的遮挡效果的程度,所述声纹标识用于表示所述第一虚拟对象的方向和位置,相邻两个声纹标识之间的显示间隔时长,与所述第一虚拟对象所在区域的视觉遮挡程度呈正相关关系。
根据本申请实施例的一个方面,提供了一种终端设备,所述终端设备包括处理器和存储器,所述存储器中存储有计算机程序,所述计算机程序由所述处理器加载并执行以实现上述音效播放方法或实现上述声纹标识显示方法。
根据本申请实施例的一个方面,提供了一种计算机可读存储介质,所述计算机可读存储介质中存储有计算机程序,所述计算机程序由处理器加载并执行以实现上述音效播放方法或实现上述声纹标识显示方法。
根据本申请实施例的一个方面,提供了一种计算机程序产品,该计算机程序产品包括计算机程序,该计算机程序存储在计算机可读存储介质中。终端设备的处理器从计算机可读存储介质读取该计算机程序,处理器执行该计算机程序,使得该终端设备执行上述音效播放方法或执行上述声纹标识显示方法。
本申请实施例提供的技术方案可以包括如下有益效果:
一方面,在虚拟对象位于虚拟环境的视觉遮挡区域内的情况下,对虚拟对象在视觉遮挡区域内触发的发声事件的音效进行削弱处理,以使得播放出来的经过削弱处理后的音效在辨别发声位置上的效果被削弱。考虑到视觉遮挡(如存在障碍物)可能会阻碍声音传播(该障碍物会使声音发生反射、折射等等),因此将视觉上的遮挡与听觉上的音效削弱有机结合,能够模拟出在视觉遮挡情况下更加真实的音效。不仅丰富了播放的音效的多样性,还给予用户身临其境之感,提高了用户的对局体验。
另一方面,该音效仅被削弱,而非完全取消,仍然可以基于该音效感知到第一虚拟对象触发的发声事件(如感知到第一虚拟对象在走路、或者发出攻击等等)。而削弱发声事件的音效则使得对于第一虚拟对象的发声位置的感知效果降低,使得第一虚拟对象的发声位置更加难辨,在提升音效丰富性的同时,丰富了人机互动形式,提升了游戏趣味性。
再一方面,本申请实施例中,视觉遮挡区域不仅可以在视觉上遮挡住位于视觉遮挡区域内的虚拟对象,还可以通过对音效的削弱处理从听觉上模糊虚拟对象的位置,丰富了视觉遮挡区域的功能。
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本申请。
附图说明
图1是本申请一个实施例提供的虚拟环境的示意图;
图2是本申请一个实施例提供的计算机系统的示意图;
图3是本申请一个实施例提供的音频播放方法的流程图;
图4是本申请一个实施例提供的配置界面的示意图;
图5是本申请另一个实施例提供的音频播放方法的流程图;
图6是本申请另一个实施例提供的配置界面的示意图;
图7是本申请另一个实施例提供的音频播放方法的流程图;
图8是本申请一个实施例提供的视觉遮挡区域的示意图;
图9是本申请一个实施例提供的声纹标识显示方法的流程图;
图10是本申请另一个实施例提供的视觉遮挡区域的示意图;
图11是本申请一个实施例提供的音频播放装置的框图;
图12是本申请一个实施例提供的声纹标识显示装置的框图;
图13是本申请一个实施例提供的终端设备的框图。
具体实施方式
这里将详细地对示例性实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本申请相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本申请的一些方面相一致的方法的例子。
在一些实施例中,请参考图1的子图(a),在虚拟对象11位置移动的过程中,若虚拟对象11此时位于烟雾弹的烟雾范围之外的区域12,则直接播放虚拟对象11每一次位置移动对应的初始的音效。如图1的子图(b)所示,若虚拟对象11此时位于烟雾弹所生成的烟雾的覆盖区域13内,则对位置移动对应的初始的音效进行削弱处理,得到位置移动对应的削弱后的音效,并播放位置移动对应的削弱后的音效。
请参考图2,其示出了本申请一个实施例提供的计算机系统的示意图,该计算机系统可以实现为音效播放系统。如图2所示,该系统200可以包括:终端设备14。
终端设备14中安装并运行有目标应用程序,如目标应用程序的客户端。可选地,客户端中登录有用户账号。终端设备是具备数据计算、处理和存储能力的电子设备。终端设备可以是智能手机、平板电脑、PC(Personal Computer,个人计算机)、可穿戴设备等等,本申请实施例对此不作限定。该目标应用程序可以是游戏应用程序,如射击类游戏应用程序、多人枪战类生存游戏应用程序、大逃杀生存类游戏应用程序、LBS(Location Based Service,基于位置服务)类游戏应用程序、MOBA(Multiplayer Online Battle Arena,多人在线战术竞技)类游戏应用程序等等,本申请实施例对此不作限定。该目标应用程序还可以是社交应用程序、支付应用程序、视频应用程序、音乐应用程序、购物应用程序、新闻应用程序等任何具有音效播放功能的应用程序。本申请实施例提供的方法,各步骤的执行主体可以是终端设备14,如运行在该终端设备14中的客户端。
在一些实施例中,该系统200还包括服务器15,服务器15与终端设备14建立有通信连接(如网络连接),服务器15用于为目标应用程序提供后台服务。服务器可以是独立的物理服务器,也可以是多个物理服务器构成的服务器集群或者分布式系统,还可以是提供云计算服务的云服务器。本申请实施例提供的方法,各步骤的执行主体可以是终端设备14;本申请实施例的各步骤也可以由终端设备14和服务器15交替执行。
下面,通过几个实施例对本申请技术方案进行介绍说明。
请参考图3,其示出了本申请一个实施例提供的音效播放方法的流程图。在本实施例中,以该方法应用于上文介绍的客户端中来举例说明。该方法可以包括如下几个步骤(310~320)中的至少之一。
步骤310,显示包含有第一虚拟对象的虚拟环境。
在一些实施例中,上文介绍的客户端中登录的用户账号,控制的虚拟对象可以是虚拟环境中的第二虚拟对象,第二虚拟对象与第一虚拟对象是参与同一局游戏、位于同一虚拟环境中的不同虚拟对象,上文介绍的终端设备14用于展示通过控制第二虚拟对象的视角观察到的虚拟环境(包括虚拟环境中的其他虚拟对象,如第一虚拟对象)、以及播放用于模拟第二虚拟对象所听到虚拟环境中的音效,即用户可以通过控制第二虚拟对象听到虚拟环境中的音效。
在一些实施例中,上文介绍的终端设备14可以包括第一终端设备和第二终端设备,其中第一终端设备上安装有目标应用程序的第一客户端,第二终端设备上安装有目标应用程序的第二客户端,第一用户的第一用户账号在目标应用程序的第一客户端中控制的第一虚拟对象,第二用户的第二用户账号在目标应用程序的第二客户端中控制的第二虚拟对象(也即主控虚拟对象)。当然,本申请实施例中的第一虚拟对象除了属于用户控制的虚拟对象之外,还可以属于服务器控制的虚拟对象(人工智能虚拟对象)。可选地,第一虚拟对象和第二虚拟对象处于同一虚拟环境中。可选地,第一虚拟对象和第二虚拟对象可以属于同一个阵营、同一个队伍、同一个组织、具有好友关系或具有临时性的通讯权限,此时第二虚拟对象认为是第一虚拟对象的友方虚拟对象。可选的,第一虚拟对象和第二虚拟对象可以属于不同的阵营、不同的队伍、不同的组织或具有敌对关系,此时第二虚拟对象认为是第一虚拟对象的敌方虚拟对象。可选地,第一终端设备和第二终端设备上安装的客户端是相同的,或两个终端上安装的客户端是不同操作系统平台(安卓或IOS)上的同一类型客户端。第一终端设备可以泛指多个终端设备中的一个,第二终端设备可以泛指多个终端设备中的另一个,本实施例仅以第一终端设备和第二终端设备来举例说明。
在一些实施例中,虚拟环境是目标应用程序在终端设备上运行时显示(或提供)的环境。虚拟环境可以是对真实世界的仿真环境,也可以是半仿真半虚构的环境,还可以是纯虚构的环境。虚拟环境可以是二维虚拟环境、2.5维虚拟环境和三维虚拟环境中的任意一种,本申请实施例对此不加以限定。示例性地,在第二终端设备上显示包含有第一虚拟对象的虚拟环境。在一些实施例中,本申请实施例所提供的方法的执行主体为第二终端设备。
在一些实施例中,虚拟对象是指虚拟环境中能够触发发声事件的虚拟元素。虚拟对象可以是虚拟环境中的可活动对象,也可以是虚拟环境中不可活动的、位置固定的对象。在虚拟对象为虚拟环境中的可活动对象时,用户能够通过目标应用程序提供的功能控制对应的虚拟对象在虚拟环境中活动,或者由目标应用程序自行控制虚拟对象在虚拟环境中活动。以目标应用程序为游戏应用程序为例,虚拟对象可以指游戏角色。在虚拟对象为游戏角色时,虚拟对象可以是人物形态,可以是动物、卡通或者其它形态,本申请实施例对此不作限定。虚拟对象也可以是虚拟道具,其中,虚拟道具可以是虚拟载具(如虚拟汽车、虚拟飞行载具、虚拟摩托车、虚拟自行车、虚拟船只、虚拟滑板等)、虚拟攻击道具(如虚拟射击道具、虚拟刀具、虚拟投掷道具等)、虚拟发声道具(如虚拟喇叭、虚拟音响、虚拟口哨、虚拟乐器等)等。
在一些实施例中,虚拟对象可以以三维形式展示,也可以以二维形式展示,本申请实施例对此不作限定。可选地,虚拟对象位于虚拟环境中,当虚拟环境为三维虚拟环境时,虚拟对象可以是基于动画骨骼技术创建的三维立体模型。虚拟对象在三维虚拟环境中具有自身的形状和体积,占据三维虚拟环境中的一部分空间。
本申请实施例中在终端设备上显示虚拟环境时,存在至少三种方式来进行显示。第一种是第一人称视角,也即在第二虚拟对象的头部安装虚拟摄像机,以该虚拟摄像机对于虚拟环境进行观察得到的画面,作为显示出来的虚拟环境的展示画面,此时显示的虚拟环境的画面中并不包括第二虚拟对象。第二种是第三人称视角,也即在第二虚拟对象的后方安装虚拟摄像机,以该虚拟摄像机对于虚拟环境进行观察得到的画面,作为显示出来的虚拟环境的画面,此时显示的虚拟环境的画面中可以包括第二虚拟对象的部分或者全部。第一人称视角和第三人称视角的朝向均随着第一虚拟对象的朝向而发生变化。第三种是具有特定方向的其他视角,该视角的朝向不发生改变,也即以虚拟摄像机按照特定朝向对整个虚拟环境进行观察得到的画面,作为显示的虚拟环境的展示画面。此时,第二虚拟对象可以显示在该虚拟环境的画面中间,也可以显示在该虚拟环境的画面的其他位置,或者不显示在该虚拟环境的展示画面中,本申请对此不作限定。
步骤320,在第一虚拟对象位于虚拟环境中的视觉遮挡区域内、且第一虚拟对象在视觉遮挡区域内触发发声事件的情况下,播放发声事件经过削弱处理后的音效,其中,视觉遮挡区域用于对区域内的虚拟元素产生遮挡效果,削弱处理用于削弱音效对于辨别第一虚拟对象所在位置的效果。
在一些实施例中,视觉遮挡区域是在视觉上遮挡区域内的虚拟元素的区域。示例性地,该视觉遮挡区域不改变区域内原有的虚拟元素。示例性地,该视觉遮挡区域是在区域内的原有的虚拟元素的上层进一步叠加的用以遮挡该虚拟元素的元素。示例性地,这里的视觉上的遮挡包括但不限于烟雾遮挡、雨水遮挡、雪花遮挡等等。
在一些实施例中,视觉遮挡区域用于对区域内的虚拟元素产生遮挡效果。示例性地,这里的遮挡效果可以指对于清晰度的遮挡。示例性地,这里的遮挡效果包括以下至少之一:使得区域内的虚拟元素从可见状态变为不可见状态、使得区域内的虚拟元素从清晰可见的状态变为模糊可见的状态。示例性地,可见状态是指用户在用户界面上可以看到该虚拟元素的状态。示例性地,不可见状态是指用户在用户界面上无法看到该虚拟元素的状态。示例性地,清晰可见的状态是指用户在用户界面上看到的虚拟元素的清晰度大于或等于预设数值。示例性地,模糊可见的状态是指用户在用户界面上看到的虚拟元素的清晰度小于预设数值。
在一些实施例中,视觉遮挡区域是虚拟环境中预设位置的区域或者动态触发的区域。示例性地,当视觉遮挡区域是虚拟环境中预设位置的区域的情况下,该视觉遮挡区域的位置由开发人员提前预设。示例性地,该视觉遮挡区域的面积或者尺寸是预设的。示例性地,该视觉遮挡区域是以目标位置为圆心,预设半径的球形区域。示例性地,当视觉遮挡区域是虚拟环境中动态触发的区域的情况下,可以由虚拟对象或者虚拟道具动态触发该视觉遮挡区域。示例性地,当虚拟对象的位置位于目标位置的情况下,触发以该目标位置为中心的视觉遮挡区域。示例性地,当虚拟对象使用虚拟道具时,以虚拟道具在虚拟环境中的投掷位置为中心,动态触发该视觉触发区域。示例性地,当虚拟对象使用虚拟道具时,以虚拟道具在虚拟环境中的使用情况,动态确定该视觉触发区域的面积。示例性地,当该虚拟道具的使用持续时长越长,该视觉触发区域的面积越大。示例性地,当该虚拟道具的使用持续时长越短,则该视觉触发区域的面积越小。
在一些实施例中,虚拟环境可以包括视觉遮挡区域,视觉遮挡区域可以对位于视觉遮挡区域内的虚拟元素在视觉上进行完全遮挡。其中,在视觉遮挡区域可以对位于视觉遮挡区域内的虚拟元素在视觉上进行完全遮挡的情况下,位于视觉遮挡区域之外的虚拟对象是完全看不见视觉遮挡区域之内的任何虚拟元素的,当然也完全看不见位于视觉遮挡区域之内的第一虚拟对象。
在一些实施例中,区域的虚拟元素是指在区域内未出现视觉遮挡区域前,就存在的虚拟元素。示例性地,该虚拟元素包括虚拟对象、虚拟环境、虚拟载具等等。示例性地,该虚拟元素是可移动的元素,也可以是不可移动的元素。
在一些实施例中,第一虚拟对象是位于视觉遮挡区域之内的虚拟对象,第二虚拟对象是位于视觉遮挡区域之外的虚拟对象。因而,在第一虚拟对象位于视觉遮挡区域内的情况下,第二虚拟对象是看不到第一虚拟对象的;也即,控制第二虚拟对象的客户端(如上文介绍的客户端)中不显示第一虚拟对象。
在一些实施例中,若第一虚拟对象和第二虚拟对象都是位于该视觉遮挡区域之内的虚拟对象。在一些实施例中,在第一虚拟对象和第二虚拟对象均位于该视觉遮挡区域之内、且第一虚拟对象与第二虚拟对象之间的距离大于或等于第二阈值的情况下,在第二虚拟对象的视角中,第一虚拟对象仍然被视觉遮挡区域完全遮挡。
在一些实施例中,视觉遮挡区域对于攻击操作是没有阻拦或阻挡效果的,但是可以从视觉上妨碍其他虚拟对象观察视觉遮挡内的虚拟对象,从而干扰视觉遮挡区域之外的虚拟对象对视觉遮挡区域之内的虚拟对象执行攻击操作。
在一些实施例中,发声事件是指会发出声音、存在对应的可播放音效的事件。在一些实施例中,发声事件可以是位置移动事件,如匍匐事件、行走事件、奔跑事件、跳跃事件、攀爬事件、驾驶载具事件、游泳事件等;在一些实施例中,发声事件还可以是攻击事件,如搏击(即不采用攻击道具的、赤手空拳的搏击)事件、射击事件等;在一些实施例中,发声事件还可以接触事件,如第一虚拟对象与虚拟环境中的其他虚拟元素(如石块、桌椅、建筑物、草垛、地面、除所述第一虚拟对象之外的其他虚拟对象)发生碰撞或摩擦的事件。例如,若第一虚拟对象为游戏角色,第一虚拟对象若撞到了围墙,第一虚拟对象就触发了撞击围墙这一发声事件,需要播放第一虚拟对象撞击围墙的音效;又例如,第一虚拟对象为虚拟投掷道具(如虚拟手榴弹),在虚拟投掷道具落到地面上时,与地面撞击,则虚拟投掷道具触发撞击地面这一发声事件,需要播放该发声事件的音效。
在一些实施例中,发声事件的数量为一个或者至少两个。示例性地,在同一个时刻,对于同一个虚拟对象仅允许触发一个发声事件。示例性地,在同一个时刻,对于同一个虚拟对象允许触发至少两个发声事件。示例性地,对于至少一次发声事件中的每个发声事件,都需要分别经过削弱处理后,播放削弱处理后的音效。示例性地,每触发一个发声事件,播放一次该发声事件经过削弱处理后的音效。
在一些实施例中,发声事件的数量的不同,对应不同数量的削弱处理后的音效。
第一种情况下,发声事件的数量为一个。示例性地,发声事件经过削弱处理后的音效的数量也为一个。此种情况下,对发声事件对应的初始音效执行削弱处理,得到发声事件经过削弱处理后的音效。
第二种情况下,发声事件的数量为至少两个。示例性地,发声事件经过削弱处理后的音效的数量也为至少两个。此种情况下,对至少两个发声事件分别执行削弱处理,得到至少两个发声事件分别经过削弱处理后的音效。示例性地,经过削弱处理后的音效的数量和发声事件的数量相同。
第三种情况下,发声事件的数量为至少两个。示例性地,发声事件经过削弱处理后的音效的数量为一个。此种情况下,对至少两个发声事件执行削弱处理,得到至少两个发声事件对应的一个经过削弱处理后的音效。示例性地,经过削弱处理后的音效的数量和发声事件的数量不同。此种情况下,至少两个发声事件对应一个混合音效。示例性地,对该混合音效执行削弱处理,得到削弱处理后的音效。示例性地,获取至少两个发声事件分别对应的音效,并混合得到该混合音效。示例性地,提前预设至少两个发声事件对应的混合音效,该混合音效用于指示该至少两个发声事件分别对应的音效。
在一些实施例中,若发声位置位于视觉遮挡区域内(即第一虚拟对象位于视觉遮挡区域内),则为了得到第二虚拟对象对应的客户端播放的音效,需要在该发声事件初始的音效的基础上进行削弱处理,得到该发声事件经过削弱处理后的音效,即得到上述客户端需要播放的音效,之后,上述客户端播放该发声事件经过削弱处理后的音效。在一些实施例中,削弱处理也可以称为模糊处理,即通过模糊处理后得到的音效,模糊对虚拟对象的位置的判断。
在一些实施例中,该削弱处理的过程,可以提前完成,将削弱处理后的音效作为预设的音效。在第一虚拟对象在视觉遮挡区域内触发发声事件的情况下,直接找到对应的预设的音效,并播放该经过削弱处理后的音效。
在一些实施例中,该削弱处理的过程,可以实时完成。在第一虚拟对象在视觉遮挡区域内触发发声事件的情况下,在触发发声事件之后,再执行对于该发声事件对应的音效的削弱处理过程。
在一些实施例中,上述削弱处理的过程,可以由上文介绍的客户端执行,也可以由上文介绍的后台服务器执行,本申请实施例对此不作具体限定。对于削弱处理过程的具体解释说明,可以参见下文实施例内容,此处不再赘述。
在一些实施例中,获取第一虚拟对象的实时位置(包括时间和对象位置坐标)。示例性地,获取视觉遮挡区域的实时位置(包括时间和区域位置坐标)。示例性地,获取第一虚拟对象触发发声事件的时间。示例性地,在根据第一虚拟对象和第一视觉遮挡区域分别对应的实时位置,以及第一虚拟对象触发发声事件的时间,判断出第一虚拟对象是否位于该虚拟环境中的视觉遮挡区域内,以及第一虚拟对象是否在该视觉遮挡区域内触发发声事件。
在一些实施例中,视觉遮挡区域包括虚拟环境中的虚拟烟雾装置所生成的烟雾的生效区域,或者称为覆盖区域,覆盖区域的底面的中心点,为虚拟烟雾装置生成烟雾的位置。示例性地,烟雾的覆盖区域大于或者等于烟雾的生效区域。示例性地,在烟雾的覆盖区域的边缘位置认为烟雾的非生效区域。示例性地,提前设定好烟雾的覆盖区域对应的生效区域。示例性地,将烟雾的全部覆盖区域认为是烟雾的生效区域。示例性地,将烟雾的全部覆盖区域中的部分覆盖区域认为是烟雾的生效区域。示例性地,将烟雾的全部覆盖区域中,到全部覆盖区域的边缘位置的距离大于或等于预设数值的区域,作为该烟雾的生效区域。
在一些实施例中,虚拟烟雾装置可以是烟雾弹,烟雾弹是一种引爆后可以生成烟雾的道具,烟雾弹生成的烟雾扩散到虚拟环境的空间中,形成上述的覆盖区域。在一些实施例中,烟雾弹可以是由第一虚拟对象或第一虚拟对象所在团队的其他虚拟对象引爆的。在一些实施例中,第二虚拟对象可以是第一虚拟对象所在团队的虚拟对象,也可以是与第一虚拟对象存在竞争关系或敌对关系的虚拟对象,本申请实施例对此不作具体限定。在一些实施例中,覆盖区域可以是长方体形、球形、半球形、圆柱形等任意形状的区域。在一些实施例中,如图4所示,在覆盖区域为长方体形的情况下,可以通过烟雾弹配置界面40,配置覆盖区域的长(可表示为X)、宽(可表示为Y)、高(可表示为Z)。例如,配置覆盖区域的长、宽、高可以分别为600厘米、600厘米、300厘米。
覆盖区域的形状具体可以由相关技术人员进行设定,本申请实施例对此不作具体限定。
在一些实施例中,在视觉遮挡区域包括上述覆盖区域的情况下,该步骤320可以替换为:在第一虚拟对象位于虚拟环境中烟雾的覆盖区域、且第一虚拟对象在覆盖区域内触发至少一次发声事件的情况下,播放至少一次发声事件经过削弱处理后的音效,其中,覆盖区域用于对区域内的虚拟元素进行视觉上的遮挡,削弱处理用于削弱音效对于辨别第一虚拟对象所在位置的效果。
在一些实施例中,视觉遮挡区域还可以是虚拟环境中弥漫有雾气的区域,还可以是虚拟环境中存在沙尘暴现象的区域,还可以是虚拟环境中没有光线或光线昏暗的区域,还可以是虚拟环境中下雨的区域,本申请实施例对此不作具体限定。
综上所述,本申请实施例提供的技术方案,在虚拟对象位于虚拟环境的视觉遮挡区域内的情况下,对虚拟对象在视觉遮挡区域内触发的发声事件的音效进行削弱处理,以使得播放出来的经过削弱处理后的音效在辨别发声位置上的效果被削弱。考虑到视觉遮挡(如存在障碍物)可能会阻碍声音传播(该障碍物会使声音发生反射、折射等等),因此将视觉上的遮挡与听觉上的音效削弱有机结合,能够模拟出在视觉遮挡情况下更加真实的音效。不仅丰富了播放的音效的多样性,还给予用户身临其境之感,提高了用户的对局体验。该音效仅被削弱,而非完全取消,仍然可以基于该音效感知到第一虚拟对象的位置。另外,播放的削弱处理后的音效,使得第一虚拟对象的位置更加难辨,在提升音效丰富性的同时,丰富了人机互动形式,提升了游戏趣味性。另外,本申请实施例中,视觉遮挡区域不仅可以在视觉上遮挡住位于视觉遮挡区域内的虚拟对象,还可以通过对音效的削弱处理从听觉上模糊虚拟对象的位置,丰富了视觉遮挡区域的功能。
请参考图5,其示出了本申请另一个实施例提供的音效播放方法的流程图。在本实施例中,以该方法应用于上文介绍的客户端中来举例说明。该方法可以包括如下几个步骤(510~540)中的至少之一。
步骤510,显示包含有第一虚拟对象的虚拟环境。
该步骤510与上述图3实施例中步骤310的内容相同或相近,此处不再赘述。
步骤520,在第一虚拟对象位于虚拟环境中的视觉遮挡区域内、且第一虚拟对象在视觉遮挡区域内触发发声事件的情况下,获取发声事件初始的音效参数。
在一些实施例中,第一虚拟对象在视觉遮挡区域内触发发声事件之后,获取发声事件初始的音效对应的音效参数,即获取发声事件初始的音效参数。在一些实施例中,音效参数是在播放发声事件的声音时所需要用到的参数,包括音量值、空间参数、音频值、音色中的至少一种参数。在一些实施例中,不同发声事件各自对应的初始的音效可以相同也可以不相同。其中,发声事件初始的音效是指发声事件在正常情况下对应播放的音效,也可以称为是发声事件的基础音效。在一些实施例中,对于第二虚拟对象对应的客户端,第一虚拟对象触发的发声事件初始的音效参数,是根据该发声事件的类型、以及该发声事件的发声位置与第二虚拟对象的相对位置关系(即第一虚拟对象与第二虚拟对象的相对位置关系)确定出来的。在一些实施例中,至少一次发声事件中的每次发声事件,都有各自对应于第二虚拟对象的初始的音效参数。在一些实施例中,各个发声事件初始的音效参数中可以包括多个参数。
在一些实施例中,发声事件初始的音效参数可以是由客户端确定出来的,也可以是由后台服务器确定出来的,本申请实施例对此不作具体限定。示例性地,发声事件初始的音效参数预先存储在终端设备或者服务器上。在一些实施例中,若发声事件初始的音效参数是由后台服务器确定出来的,在后台服务器确定发声事件初始的音效参数之后,后台服务器可以向客户端发送发声事件初始的音效参数,由客户端执行步骤530。
步骤530,基于发声事件初始的音效参数,对发声事件初始的音效执行削弱处理,得到发声事件削弱后的音效参数。
在一些实施例中,发声事件初始的音效具有空间立体度,即用户可以根据发声事件初始的音效,辨别发声事件的发声位置,即辨别第一虚拟对象触发该发声事件的位置,发声事件初始的音效对于辨别发声事件的发声位置具有较好的效果。
为了提升视觉遮挡区域对位于其中的虚拟对象(如第一虚拟对象)的掩蔽程度和掩蔽效果,当第一虚拟对象触发的发声事件位于视觉遮挡区域内时,可以对第一虚拟对象触发的发声事件初始的音效参数进行调整(即削弱处理),得到发声事件经过削弱处理后的音效,即得到发声事件经过削弱处理后的音效。其中,发声事件初始的音效对于辨别发声事件的发声位置的效果(即对于辨别第一虚拟对象所在位置的效果),高于发声事件经过削弱处理后的音效对于辨别发声事件的发声位置的效果,从而削弱最终播放的音效对于定位第一虚拟对象的效果和作用,提升第二虚拟对象对应的用户通过至少一次发声事件的音效来确定第一虚拟对象的难度。
在一些实施例中,上述步骤520和530可以由客户端执行;也可以是由上文介绍的后台服务器执行。在一些实施例中,上述步骤520和530还可以由客户端和服务器分别执行,例如,由服务器执行步骤520、由客户端执行步骤530。
在一些实施例中,对至少一次发声事件中的第一发声事件,对第一发声事件对应的初始的音效执行削弱处理,得到第一发声事件对应的削弱后的音效参数。示例性地,第一发声事件是至少一次发声事件中的任意一个发声事件。
在一些实施例中,对发声事件对应的初始的音效执行削弱处理,得到发声事件对应的削弱后的音效参数包括以下至少之一:对发声事件对应的初始的音效的音量值执行削弱处理,得到发声事件对应的削弱后的音量值。对发声事件对应的初始的音效的空间参数执行削弱处理,得到发声事件对应的削弱后的空间参数。对发声事件对应的初始的音效的音频值执行削弱处理,得到发声事件对应的削弱后的音频值。对发声事件对应的初始的音效的音色执行削弱处理,得到发声事件对应的削弱后的音色。
步骤540,按照发声事件削弱后的音效参数,播放发声事件的音效。
在一些实施例中,削弱后的音效参数包括削弱后的音量值、削弱后的空间参数、削弱后的音频值以及削弱后的音色中的至少之一。
在一些实施例中,按照发声事件削弱后的音量值、削弱后的空间参数、削弱后的音频值以及削弱后的音色中的一个或者多个,播放发声事件的音效。在一些实施例中,按照发声事件的削弱后的音量值,播放发声事件的音效。在一些实施例中,按照发声事件的削弱后的空间参数,播放发声事件的音效。在一些实施例中,按照发声事件的削弱后的音频值,播放发声事件的音效。在一些实施例中,按照发声事件的削弱后的音色,播放发声事件的音效。
在一些实施例中,发声事件是直接配置在第一虚拟对象移动的动画文件的时间轴上的。如图6所示,若发声事件为位置移动,第一虚拟对象每次移动,会同步触发时间轴61上的会播放对应音效的脚步事件,如脚步声62对应的脚步事件、如脚步声63对应的脚步事件。
综上所述,本申请实施例提供的技术方案,通过对发声事件初始的音效执行削弱处理,削弱最终播放的音效对于定位第一虚拟对象的效果和作用。
另外,通过削弱处理,还提升了第二虚拟对象对应的用户通过发声事件的音效来确定第一虚拟对象的难度,从而提升视觉遮挡区域对位于其中的虚拟对象的掩蔽效果。
在一些实施例中,音效参数包括音量值;上述步骤530可以包括:对于至少一次发声事件中的第一发声事件,基于第一发声事件初始的音量值,确定第一发声事件削弱后的音量值,其中,第一发声事件削弱后的音量值低于第一发声事件初始的音量值。在一些实施例中,基于发声事件初始的音量值,确定发声事件削弱后的音量值,其中,发声事件削弱后的音量值低于发声事件初始的音量值。
在一些实施例中,若第一发声事件的发声位置位于视觉遮挡区域内,在第一发声事件初始的音量值的基础上,削弱或降低第一发声事件的音效的音量值,以得到第一发声事件削弱后的音量值。
在一些实施例中,音量值也可以称为是响度值。在一些实施例中,音量值的单位为分贝(dB,decibel)。在一些实施例中,按照设定的音量差值,削弱第一发声事件初始的音量值。也即,将第一发声事件初始的音量值,减去该音量差值,即可得到第一发声事件削弱后的音量值。在一些实施例中,音量差值可以是3dB、4dB等等。当然,音量差值还可以是其他数值,音量差值的具体取值,可以由相关技术人员根据实际情况进行设定,本申请实施例对此不作具体限定。
在一些实施例中,按照设定的音量降低幅度,削弱发声事件初始的音量值,即可得到发声事件。示例性地,设定的音量降低幅度为K。则,将发声事件初始的音量值,减去发声事件初始的音量值乘以设定的音量降低幅度K所得到的结果,为发声事件削弱后的音量值。K为非负数。
在一些实施例中,按照设定的衰减系数,削弱发声事件初始的音量值,即可得到发声事件。示例性地,设定的衰减系数为W。则,将发声事件初始的音量值乘以设定的衰减系数W所得到的结果,为发声事件削弱后的音量值。W为非负数。
在上述实现方式中,通过降低音量值,对发声事件的音效进行削弱处理,从而降低最终播放的音效的音量,也即降低了音效在听感上的清晰度,由于音量降低会导致人耳对声音的分辨力也降低,从而实现了削弱音效对于辨别所述第一虚拟对象所在位置的效果。
在一些实施例中,音效参数包括空间参数;上述步骤530可以包括:对于至少一次发声事件中的第一发声事件,基于第一发声事件初始的空间参数,确定第一发声事件削弱后的空间参数,其中,削弱后的空间参数对于辨别发声位置所在的方向和距离的效果,弱于初始的空间参数对于辨别发声位置所在的方向和距离的效果。在一些实施例中,基于发声事件初始的空间参数,确定发声事件削弱后的空间参数,其中,削弱后的空间参数对于辨别发声位置所在的方向和距离的效果,弱于初始的空间参数对于辨别发声位置所在的方向和距离的效果。
在一些实施例中,由于虚拟环境仅是对真是世界的仿真,第一发声事件并不是真实发生的,实际上第一发声事件的音效是通过终端设备中内置的音频播放装置、或通过终端设备的外接音频播放设备播放出来的,而空间参数可以用于模拟虚拟环境中发声位置相对于第二虚拟对象的方向和距离。在一些实施例中,第一发声事件初始的音效的空间参数,对于辨别第一发声位置相对于第二虚拟对象的方向和距离具有较好的效果,因而,在削弱处理过程中,可以通过调整空间参数,来削弱音效对于辨别第一发声位置相对于第二虚拟对象的方向和距离的辨别效果,从而模糊用户根据第一发声事件对应播放出来的音效对第一虚拟对象所在位置的感知和判断。
在一些实施例中,空间参数是指能够影响声音在虚拟空间中的定位、传播和感知的参数。在一些实施例中,空间参数包括以下至少之一:方向(声音可以定位在不同的方向,包括上方、下方以及四周,模拟玩家如何听到来自各个方向的声音。这有助于玩家在游戏中判断声音的来源和敌人的位置)、距离(声音的表现可以让玩家感知到声音的远近,增加音效的层次感。在游戏中,这通常通过调整声音的音量、音高和延迟等参数来实现,以模拟声音随着距离衰减的自然现象)、动态移动(声音可以动态变化,创造声音移动的感受。这有助于模拟游戏中物体移动或角色交互时的声音效果,增强游戏的真实感)、空间混响(模拟声音在室内或室外空间中传播时的反射和衰减效果。这可以通过添加混响效果或调整混响参数来实现,以营造更加逼真的游戏环境)、三维音效设置(许多游戏都支持三维音效,这允许声音在三维空间中定位和传播。相关的空间参数可能包括声音在三维空间中的坐标、扩散角度、声音衰减速度等,这些参数可以精确控制声音在游戏世界中的位置和传播方式)、多普勒效应(当声源和听者之间存在相对运动时,听者感知到的声音频率会发生变化,这就是多普勒效应。在游戏中,可以通过模拟这种效应来增强声音的真实感,特别是在车辆、飞行器等移动物体发出的声音上)。还有一些与音效播放和管理相关的参数,如声音文件的格式、质量、加载方式等,这些虽然不直接属于空间参数,但也会对游戏中的音效体验产生影响。
在一些实施例中,基于第一发声事件初始的空间参数,确定第一发声事件削弱后的空间参数。示例性地,对第一发声事件初始的空间参数中的方向、距离、空间混响、三维音效设置、多普勒效应中的至少之一执行削弱处理,得到第一发声事件削弱后的空间参数。示例性地,删除第一发声事件初始的空间参数中的方向、距离、空间混响、三维音效设置、多普勒效应中的至少之一,得到第一发声事件削弱后的空间参数。示例性地,降低第一发声事件初始的空间参数中的方向、距离、空间混响、三维音效设置、多普勒效应中的至少之一,得到第一发声事件削弱后的空间参数。
在一些实施例中,空间参数包括至少两个声道各自的音效之间的时间差和音量差;基于第一发声事件初始的空间参数,确定第一发声事件削弱后的空间参数,包括:基于第一发声事件的至少两个声声道各自的音效之间初始的时间差或音量差,确定第一发声事件削弱后的时间差或音量差。
在一些实施例中,基于发声事件的至少两个声道各自的音效之间初始的时间差或音量差,确定发声事件削弱后的时间差或音量差。
在一些实施例中,第一发声事件的音效包括多个声道的音轨,每个音轨可以由对应的一个声道进行播放。例如,第一发声事件可以对应有左声道的音轨和右声道的音轨。在一些实施例中,空间参数包含的多个声道之间的时间差和音量差,可以用于模拟第一发声事件在对应位置发出的声音,传播到第二虚拟对象两耳中的效果。因而,通过调整多个声道各自的音效之间初始的时间差或音量差,可以削弱音效对于第一虚拟对象所在位置的辨别效果,从而实现对发声事件的音效的削弱处理。
在一些实施例中,对第一发声事件初始的空间参数进行调整,得到第一发声事件削弱后的空间参数。在一些实施例中,可以分别调节第一发声事件的空间参数中包含的各个子参数(如上述时间差、音量差),从而得到第一发声事件削弱后的空间参数。在一些实施例中,空间参数是封装好的一个参数,用于影响音频表达声源位置的效果,仅需要调节空间参数对应的一个参数值,就可以自动确定调节后的各个子参数的值,如确定第一发声事件削弱后的时间差或音量差。在一些实施例中,初始的空间参数对应的参数值为第一参数值,削弱后的空间参数的参数值为第二参数值。示例性地,第一参数值大于第二参数值。示例性地,第二参数值由开发人员或者用户自行设定。示例性地,用户可以自行拖动滑块,以调节得到第二参数值的具体数值。例如,第一发声事件初始的空间参数可以表示为3D Spatialization(三维参数)可以设定为100%,第一发声事件削弱后的空间参数(即调整后的3D Spatialization)可以设定为50%。
在一些实施例中,基于发声事件的至少两个声道各自的音效之间初始的时间差或音量差,确定发声事件削弱后的时间差或音量差。示例性地,对于至少两个声道中的第一声道和第二声道,获取第一声道和第二声道各自的音效之间初始的时间差,第一声道和第二声道为至少两个声道中不同的任意两个声道。示例性地,降低第一声道和第二声道各自的音效之间初始的时间差,得到削弱后的时间差。示例性地,时间差的降低幅度为预设的数值或者比例。示例性地,对于至少两个声道中的第一声道和第二声道,获取第一声道和第二声道各自的音效之间初始的音量差,第一声道和第二声道为至少两个声道中不同的任意两个声道。示例性地,降低第一声道和第二声道各自的音效之间初始的音量差,得到削弱后的音量差。示例性地,音量差的降低幅度为预设的数值或者比例。示例性地,将发声事件削弱后的时间差或者音量差,作为发声事件削弱后的空间参数。
在上述实现方式中,通过调整空间参数,一定程度上模糊了发声事件的音效对于发声位置的表现力,从而实现了削弱音效对于辨别所述第一虚拟对象所在位置的辨别效果。
另外,通过削弱发声事件的至少两个声道各自的音效之间初始的时间差或音量差,以确定发声事件削弱后的时间差或音量差,作为发声事件削弱后的空间参数。体现了对于空间参数的削弱方式的多样性和灵活性,有利于实现对于空间参数的削弱处理,且保证了空间参数的削弱效率。
在一些实施例中,上述步骤530可以包括:对于至少一次发声事件中的第一发声事件,基于视觉遮挡区域对应的频率限制信息,确定第一发声事件属于音效播放事件还是音效隐藏事件,频率限制信息用于限制播放发声事件的音效的频率,音效播放事件是指播放对应音效的发声事件,音效隐藏事件是指隐藏对应音效的发声事件。在一些实施例中,上述步骤540,可以包括:在第一发声事件属于音效播放事件的情况下,播放第一发声事件的音效;在第一发声事件属于音效隐藏事件的情况下,隐藏第一发声事件的音效。
在一些实施例中,基于视觉遮挡区域对应的频率限制信息,确定发声事件属于音效播放事件还是音效隐藏事件,频率限制信息用于限制播放发声事件的音效的频率,音效播放事件是指播放对应音效的发声事件,音效隐藏事件是指隐藏对应音效的发声事件;在发声事件属于音效播放事件的情况下,播放发声事件的音效;其中,在发声事件属于音效隐藏事件的情况下,发声事件的音效不被播放。
在一些实施例中,视觉遮挡区域对发声事件的音效播放频率存在限制。也即,并不是每次发声事件都会播放对应的音效;存在部分发声事件,第二虚拟对象对应的客户端并不会播放对应的任何音效。按照频率限制信息需要播放对应音效的发声事件,属于音效播放事件;按照频率限制信息需要隐藏的发声事件(即不播放任何音效的发送事件),属于音效隐藏事件。
在一些实施例中,基于视觉遮挡区域对应的频率限制信息,确定第一发声事件属于音效播放事件还是音效隐藏事件的步骤,可以由客户端执行,也可以由服务器执行,本申请实施例对此不作具体限制。
在一些实施例中,频率限制信息包括以下至少之一:
1、在第一时长内,音效播放事件的数量小于或等于第一阈值。
在一些实施例中,通过限制第一时长内可以被判定为音效播放事件的发声事件的数量,来限制播放发声事件的音效的频率。在一些实施例中,在第一时长内触发的发声事件的数量小于或等于第一阈值的情况下,第一时长内触发的发声事件都属于音效播放事件,对应的音效都需要进行播放;在第一时长内触发的发声事件的数量大于第一阈值的情况下,按照触发时间顺序,第一时长内在先触发的第一阈值数量的发声事件属于音效播放事件,第一时长内超过第一阈值之后的发声事件,都属于音效隐藏事件。例如,频率限制信息包括:在第一虚拟对象位于视觉遮挡区域内的情况下,5秒内仅允许播放第一虚拟对象的2次位置移动(即触发发声事件)的脚步声(即音效),那么,在这5秒的时长内,第一虚拟对象第1次和第2次的位置移动属于音效播放事件,需要播放第一虚拟对象第1次和第2次的位置移动各自对应的脚步声;在这5秒内,第3次以及第3次之后的位置移动的脚步声就不播放了,也即,第二虚拟对象对应的用户就听不到第3次以及第3次之后的位置移动的脚步声了。
2、每n次连续的发声事件中存在m个发声事件属于音效播放事件,n、m为大于1的整数,m小于n。
在一些实施例中,对于第一虚拟对象触发的发声事件,按照规律确定发声事件是否属于音效播放事件。
在一些实施例中,每n次连续的发声事件中的前m个发声事件确定属于音效播放事件,该n次连续的发声事件中位于m次发声事件之后的发声事件确定属于音效隐藏事件。例如,若n为2、m为1,那么,至少一次发声事件按照触发的时间顺序,分别为:音效播放事件、音效隐藏事件;音效播放事件、音效隐藏事件;音效播放事件、音效隐藏事件……
在一些实施例中,每n次连续的发声事件中最后的m个发声事件确定属于音效播放事件,该n次连续的发声事件中位于m次发声事件之前的发声事件确定属于音效隐藏事件。例如,若n为5、m为3,那么,至少一次发声事件按照触发的时间顺序,分别为:音效播放事件、音效播放事件、音效隐藏事件、音效隐藏事件、音效隐藏事件;音效播放事件、音效播放事件、音效隐藏事件、音效隐藏事件、音效隐藏事件……
3、音效播放事件或音效隐藏事件是随机确定的。
在一些实施例中,对于每一次发声事件,都可以通过随机模型确定该发声事件属于音效播放事件还是属于音效隐藏事件。例如,对于发声事件A,随机模型的输出为“1”,则表示发声事件A属于音效播放事件;若随机模型的输出为“0”,则表示发声事件A属于音效隐藏事件。
在上述实现方式中,通过限制音效的播放频率,使得播放了对应音效的发声事件的数量,少于虚拟对象实际触发的发声事件的数量,从而减少第一虚拟对象暴露其触发的发声事件,其他虚拟对象(如第二虚拟对象)也只能通过较少数量的音效来判断第一虚拟对象的位置或移动路径,从而加强视觉遮挡区域对第一虚拟对象的掩蔽效果。
在一些实施例中,如图7所示,以视觉遮挡区域为烟雾弹生成的烟雾的覆盖区域为例,该方法还可以包括如下步骤:
步骤710,在第一虚拟对象进入覆盖区域的情况下,若第一虚拟对象触发位置移动事件,判断烟雾弹的持续事件是否已到达,若是,执行步骤720;若否,执行步骤730;
步骤720,播放位置移动事件初始的音效;
步骤730,基于位置移动事件初始的音效,削弱音量值、空间参数以及限制发声事件的音效播放频率。
在一些实施例中,视觉遮挡区域包括视觉遮挡程度不同的至少两个子区域,同一子区域中不同位置的视觉遮挡程度相同;播放发声事件经过削弱处理后的音效(即步骤320),可以包括:在发声事件的发声位置,位于至少两个子区域中的第一子区域的情况下,基于第一子区域的视觉遮挡程度,播放发声事件经过削弱处理后的音效;其中,发声事件经过削弱处理后的音效对于辨别第一虚拟对象所在位置的削弱效果,与视觉遮挡程度呈正相关关系。在一些实施例中,在发声事件的发声位置,位于至少两个子区域中的第一子区域的情况下,发声事件经过削弱处理后的音效是基于第一子区域的视觉遮挡程度确定的;其中,发声事件经过削弱处理后的音效对于辨别第一虚拟对象所在位置的削弱效果,与视觉遮挡程度呈正相关关系。
在一些实施例中,视觉遮挡区域包括至少两个子区域,在同一个子区域中视觉遮挡程度处处相同,不同子区域的视觉遮挡程度可以不相同。在一些实施例中,视觉遮挡程度用于指示对视觉遮挡区域中的元素的遮挡效果。在一些实施例中,对于视觉遮挡程度越高的子区域,对于发声事件的音效的削弱效果越好;对于视觉遮挡程度越低的子区域,对于发声事件的音效的削弱效果越差。也就是说,对于视觉遮挡程度越高的子区域,对位于其中的虚拟元素的视觉遮挡效果和发声事件的音效削弱效果都更好;对于视觉遮挡程度越低的子区域,对位于其中的虚拟元素的视觉遮挡效果和发声事件的音效削弱效果都更差,从而使得视觉遮挡区域中各个子区域的视觉遮挡效果与对发声事件的音效削弱效果统一,使得视觉遮挡区域对第一虚拟对象在视觉上和听觉上的掩蔽效果协调统一,同时也保证了用户体验。
在一些实施例中,如图8所示,视觉遮挡区域80包括3个子区域,分别为:子区域81、子区域82和子区域83。其中,子区域81和子区域83的视觉遮挡程度相同,子区域82的视觉遮挡程度高于子区域81和子区域83。因此,子区域81和子区域83对在其中的发声事件的音效削弱效果相同,子区域82对在其中的发声事件的音效削弱效果高于子区域81和子区域83。例如,从第二虚拟对象的视角观察视觉遮挡区域80,若第一虚拟对象位于子区域81和子区域83中,还能隐约看到第一虚拟对象的身形;若第一虚拟对象位于子区域82中,就完全看不到第一虚拟对象,也即,子区域可以完全遮挡位于其中的第一虚拟对象。并且,第一虚拟对象在子区域82中位置移动的脚步声的音量,低于第一虚拟对象在子区域81或子区域83中位置移动的脚步声的音量。
在一些实施例中,对于至少一次发声事件中的第二发声事件,在第二发声事件的发声位置,位于至少两个子区域中的第一子区域的情况下,基于第一子区域的视觉遮挡程度,播放第二发声事件经过削弱处理后的音效;其中,第二发声事件经过削弱处理后的音效对于辨别第一虚拟对象所在位置的削弱效果,与视觉遮挡程度呈正相关关系。在一些实施例中,第二发声事件是至少一次发声事件中的任意一个发声事件。
在一些实施例中,获取第二发生事件的发声位置。示例性地,判断该第二发声事件的发声位置所在的区域。示例性地,该第二发声事件的发声位置所在的区域位至少两个子区域中的第一子区域。示例性地,根据预设的区域的视觉遮挡程度和削弱效果之间的对应关系,确定出第一子区域的视觉遮挡程度对应的削弱效果。示例性地,根据该第一子区域的视觉遮挡程度对应的削弱效果,来执行对于第二发声事件初始的音效的削弱处理,得到第二发声事件经过削弱处理后的音效。示例性地,这里的削弱处理包括上述实施例提及的音量值的削弱处理、空间参数的削弱处理、发声事件的音效的频率的限制等等中的至少之一。具体削弱处理方式,参见上述其他实施例的解释说明,此处不作赘述。
在一些实施例中,视觉遮挡程度用于指示对于区域内的虚拟元素的遮挡效果的程度。示例性地,视觉遮挡程度用于指示对于区域内的虚拟元素的清晰度、亮度等的遮挡效果的程度。示例性地,不同视觉遮挡程度对应不同的遮挡级别。示例性地,当视觉遮挡程度对应的遮挡级别越大,则对于区域内虚拟元素的清晰度或亮度的遮挡效果越高,也即用户界面所显示的区域内的虚拟元素的清晰度或者亮度越低。在一些实施例中,同一个视觉遮挡区域内存在至少两个子区域,每个子区域分别对应的视觉遮挡程度不同,也即遮挡级别不同。
在一些实施例中,在视觉遮挡区域为烟雾弹生成的烟雾的覆盖区域的情况下,视觉遮挡程度是根据各个子区域中的烟雾浓度确定的。在一些实施例中,子区域内的烟雾浓度越高,则视觉遮挡程度对应的遮挡级别越高。在一些实施例中,子区域内的烟雾浓度越低,则视觉遮挡程度对应的遮挡级别越低。在一些实施例中,烟雾浓度越高,对应子区域的视觉遮挡程度就越高;烟雾浓度越低,对应子区域的视觉遮挡程度就越低。在一些实施例中,烟雾的浓度会随着时间的变化而变化。对于同一个子区域,在烟雾弹引爆之后,烟雾的浓度随着时间的推移而降低,直至烟雾完全消失。因此,该子区域的视觉遮挡程度也是会随着时间而变化的。
在上述实现方式中,通过按照视觉遮挡程度划分子区域,在不同视觉遮挡程度的子区域对第一虚拟对象在视觉上和听觉上的掩蔽效果不同,从而丰富视觉遮挡区域的变化和效果;另外,视觉遮挡区域对第一虚拟对象在视觉上和听觉上的掩蔽效果协调统一,提升了用户体验。
本申请实施例中视觉遮挡区域包括烟雾的覆盖区域,是由于虚拟烟雾装置所生成的烟雾而对虚拟对象的视觉产生遮挡的区域。将视觉上的烟雾遮挡和听觉上的屏蔽效果相结合,给予用户更加真实的对局体验。在丰富人机交互形式的同时,提高了互动效率。
在一些实施例中,在上述图3实施例中的步骤320之后,在第一虚拟对象从视觉遮挡区域中移出,或者视觉遮挡区域取消的情况下,若第一虚拟对象触发发声事件,则播放发声事件的初始的音效。
在上述实现方式中,第一虚拟对象可以从视觉遮挡区域中移动至非视觉遮挡区域;或者,视觉遮挡区域也可能取消,变为非视觉遮挡区域,在第一虚拟对象所在的位置不属于视觉遮挡区域之后,第一虚拟对象触发的发声事件,都会恢复播放对应的初始的音效,通过音效的变化,位于第一虚拟对象附近的其他虚拟对象也可以更加清楚地判断第一虚拟对象的位置,从而提升游戏内容的丰富性,进而提升用户的兴趣。
在一些实施例中,播放至少一次发声事件经过削弱处理后的音效(即步骤320),可以包括:基于发声事件的类型,播放发声事件经过削弱处理后的音效;其中,对于不同类型的发声事件,对应的削弱处理方式不同。在一些实施例中,发声事件经过削弱处理后的音效是基于发声事件的类型确定的;其中,对于不同类型的发声事件,对应的削弱处理方式不同。
在一些实施例中,提前设定好发声事件的类型和削弱处理方式之间的对应关系。示例性地,该发声事件的类型和削弱处理方式之间的对应关系以表格、静态链接或者动态链接等形式存储在服务器或者终端设备上。
在一些实施例中,对于至少一次发声事件中的第三发声事件,获取该第三发声事件的事件类型。示例性地,在终端设备的本地存储有该发声事件的类型和削弱处理方式之间的对应关系的情况下,找到该第三发声事件的事件类型对应的削弱处理方式。示例性地,通过该第三发声事件的事件类型对应的削弱处理方式,执行对于第三发声事件初始的音效参数的削弱处理,得到削弱处理后的音效参数。示例性地,按照第三发声事件的削弱后的音效参数,播放第三发声事件的音效。示例性地,第三发声事件是至少一次发声之间中的任意一个发声事件。示例性地,在终端设备的本地未存储有该发声事件的类型和削弱处理方式之间的对应关系的情况下,从服务器获取该第三发声事件的事件类型对应的削弱处理方式或者从服务器获取该发声事件的类型和削弱处理方式之间的对应关系。
在一些实施例中,不同类型的发声事件,削弱处理方式和过程可以不相同,从而进一步提升游戏内容的丰富性。将发声事件的类型与削弱处理方式相结合,体现了音效削弱处理和发声事件的类型之间的关联性,进一步体现了音效削弱的灵活性以及多样性,从而带给用户更好的听觉体验,丰富人机互动形式。
在一些实施例中,在至少一次发声事件为位置移动类型的发声事件的情况下,播放至少一次发声事件经过第一削弱处理后的音效,位置移动类型的发声事件用于移动第一虚拟对象的位置;在至少一次发声事件为攻击类型的发声事件的情况下,播放至少一次发声事件经过第二削弱处理后的音效,攻击类型的发声事件用于攻击虚拟环境中的第二虚拟对象;其中,第一削弱处理对音效的削弱程度,大于第二削弱处理对音效的削弱程度。
在一些实施例中,在发声事件为位置移动类型的发声事件的情况下,发声事件经过削弱处理后的音效是发声事件经过第一削弱处理后的音效,位置移动类型的发声事件用于移动第一虚拟对象的位置;在发声事件为攻击类型的发声事件的情况下,发声事件经过削弱处理后的音效是发声事件经过第二削弱处理后的音效,攻击类型的发声事件用于攻击虚拟环境中的第二虚拟对象;其中,第一削弱处理对音效的削弱程度,大于第二削弱处理对音效的削弱程度。
在一些实施例中,对于至少一次发声事件中的第三发声事件,在第三发声事件为位置移动类型的发声事件的情况下,播放第三发声事件经过第一削弱处理后的音效,位置移动类型的发声事件用于移动第一虚拟对象的位置;在第三发声事件为攻击类型的发声事件的情况下,播放第三发声事件经过第二削弱处理后的音效,攻击类型的发声事件用于攻击虚拟环境中的第二虚拟对象;其中,第一削弱处理对音效的削弱程度,大于第二削弱处理对音效的削弱程度。
在一些实施例中,第一削弱处理是位置移动类型的发声事件对应的削弱处理方式。在一些实施例中,第二削弱处理是攻击类型的发声事件对应的削弱处理方式。在一些实施例中,第一削弱处理和第二削弱处理是提前预设的两种不同的削弱处理方式。在一些实施例中,第一削弱处理对音效的削弱程度,大于第二削弱处理对音效的削弱程度。在一些实施例中,第一削弱处理对音效的音量值的削弱程度,大于第二削弱处理对音效的音量值的削弱程度。在一些实施例中,第一削弱处理对音效的空间参数的削弱程度,大于第二削弱处理对音效的空间参数的削弱程度。在一些实施例中,第一削弱处理对音效的频率限制,大于第二削弱处理对音效的频率限制。
在上述实现方式中,通过对位置移动类型的发声事件和攻击类型的发声事件对应音效,采用不同的削弱方式,从而使得视觉遮挡区域对位置移动类型的发声事件的音效可以有更好的掩蔽效果、使得视觉遮挡区域对位置移动类型的发声事件的音效的掩蔽效果相对较差,从而提升视觉遮挡区域对于位置移动的左右、限制视觉遮挡区域的攻击作用,从而减少用户对视觉遮挡区域的滥用,提升虚拟对象之间的对战过程或竞争过程的平衡性。
请参考图9,其示出了本申请一个实施例提供的声纹标识显示方法的流程图。在本实施例中,以该方法应用于上文介绍的客户端中来举例说明。该方法可以包括如下几个步骤(910~920)中的至少一个步骤。
步骤910,显示包含有第一虚拟对象的虚拟环境。
在一些实施例中,上文介绍的客户端中登录的用户账号,控制的虚拟对象可以是虚拟环境中的第二虚拟对象,第二虚拟对象与第一虚拟对象是参与同一局游戏、位于同一虚拟环境中的不同虚拟对象,上文介绍的终端设备用于展示通过控制第二虚拟对象的视角观察到的虚拟环境(包括虚拟环境中的其他虚拟对象,如第一虚拟对象)、以及播放用于模拟第二虚拟对象所听到虚拟环境中的音效,即用户可以通过控制第二虚拟对象听到虚拟环境中的音效。在一些实施例中,上文介绍的终端设备还可以用于显示从第二虚拟对象的角度,所听到音效的声纹标识。
该步骤910的部分解释说明可以参考上述图3实施例中步骤310的内容,此处不再赘述。
步骤920,基于第一虚拟对象所在区域的视觉遮挡程度,显示第一虚拟对象触发的发声事件对应的声纹标识,视觉遮挡程度用于指示对区域内的虚拟元素产生的遮挡效果的程度,声纹标识用于表示第一虚拟对象的方位,相邻两个声纹标识之间的显示间隔时长,与第一虚拟对象所在区域的视觉遮挡程度呈正相关关系。
在一些实施例中,发声事件是指会发出声音、存在对应的可播放音效的事件。在一些实施例中,第一虚拟对象触发发声事件时,可以同时显示该发声事件的声纹标识,用于通过可视化的方式展示发声事件的相关信息,如发声事件所在的位置信息、音效特征信息等。在一些实施例中,位置信息可以包括发声位置的方位(即第一虚拟对象触发对应发声事件的方位),音效特征信息可以包括发声事件的音效的音量或音量变化信息。
在一些实施例中,考虑到第一虚拟对象有可能在短时间内连续触发多个发声事件,如连续多个位置移动事件,本申请实施例可以仅显示部分位置移动事件对应的声纹标识。例如,每隔显示间隔时长可以显示一次声纹标识。也即,在显示一次声纹标识之后的显示间隔时长之内,哪怕第一虚拟对象触发发声事件,也不会再显示声纹标识了,从而限制声纹标识的显示频次,避免声纹标识显示得太过频繁。
在一些实施例中,该显示间隔时长与第一虚拟对象所在区域的视觉遮挡程度呈正相关关系,也就是说,第一虚拟对象所在区域的视觉遮挡程度越高,显示间隔时长就越长;第一虚拟对象所在区域的视觉遮挡程度越低,显示间隔时长就越短。示例性地,显示间隔时长用于指示显示的相邻两个声纹标识之间的时间间隔。
在一些实施例中,虚拟环境中有烟雾或雾气的区域、下雨的区域、没有光线或缺少光线的区域,会限制或妨碍用户通过视觉观察虚拟环境,这种限制程度和妨碍成都,就是视觉遮挡程。在一些实施例中,虚拟环境中不同区域的视觉遮挡程度可以不相同。在一些实施例中,虚拟环境中的同一个区域在不同时间段的视觉遮挡程度也可以不相同。
在一些实施例中,不同区域环境的视觉遮挡程度或区域中不同时段的视觉遮挡程度,可以是预先配置好的,如可以用0~100%的参数值来表示视觉遮挡程度。例如,对于完全黑暗的环境区域,视觉遮挡程度可以是100%;对于雾气覆盖的区域,视觉遮挡程度可以是60%;对于不遮挡视觉的区域(即非视觉遮挡区域),视觉遮挡程度可以是0。
在一些实施例中,对于烟雾弹生成的烟雾的覆盖区域,视觉遮挡程度可以随着烟雾弹距离引爆的时长而变化。例如,在引爆后的第一时间段内,烟雾的覆盖区域的视觉遮挡程度可以是100%;在引爆后的第二时间段内,烟雾的覆盖区域的视觉遮挡程度可以是50%;在第二时间段之后,烟雾的覆盖区域的视觉遮挡程度可以是0,第一时间段和第二时间段是相邻但不重合的两个时间段,第一时间段在第二时间段之前。因此,第一时间段对应的显示间隔时长,大于第二时间段对应的显示间隔时长;第二时间段对应的显示间隔时长,大于第二时间段之后的时间段对应的显示间隔时长。例如,第一时间段对应的显示间隔时长可以是3秒,第二时间段对应的显示间隔时长可以是2秒,第二时间段之后的显示间隔时长可以是1秒。
在一些实施例中,上述数步骤920,还可以包括如下步骤:
1、在第一虚拟对象位于虚拟环境的视觉遮挡区域内的情况下,按照第一间隔时长显示声纹标识,视觉遮挡区域用于对区域内的虚拟元素进行视觉上的遮挡;
2、在第一虚拟对象位于虚拟环境的非视觉遮挡区域内的情况下,按照第二间隔时长显示声纹标识,非视觉遮挡区域是除视觉遮挡区域之外的区域;
其中,视觉遮挡区域的视觉遮挡程度,高于非视觉遮挡区域的视觉遮挡程度,第一间隔时长大于第二间隔时长。
在一些实施例中,虚拟环境中视觉遮挡程度大于0的区域,都可以称为是视觉遮挡区域;视觉遮挡程度为0的区域,可以称为是非视觉遮挡区域。显然,非视觉遮挡区域的声纹标识允许的显示频次,应当高于视觉遮挡区域的声纹标识允许的显示频次,因此,第一间隔时长应当大于第二间隔时长。
本申请实施例提供的技术方案,通过在视觉遮挡区域内和视觉遮挡区域外,采用不同的显示时间间隔来分别显示声纹标识,体现了声纹标识显示方式的灵活性和多样性。另外,在视觉遮挡区域内通过提高声纹标识显示的时间间隔的方式,将视觉遮挡、声纹显示相结合,丰富了人机互动形式,也丰富了声纹标识的显示方式。
在一些实施例中,视觉遮挡区域包括视觉遮挡程度不同的至少两个子区域,同一子区域中不同位置的视觉遮挡程度相同;在第一虚拟对象位于虚拟环境的视觉遮挡区域内的情况下,按照第一间隔时长显示声纹标识,包括如下步骤:
1、在第一虚拟对象位于视觉遮挡区域内的情况下,获取第一虚拟对象触发发声事件的位置;
2、根据第一虚拟对象触发发声事件的位置,确定第一虚拟对象触发发声事件时所在的子区域;
3、将第一虚拟对象触发发声事件时所在的子区域对应的显示间隔时长,确定为第一间隔时长,并按照第一间隔时长显示声纹标识。
在一些实施例中,视觉遮挡区域中不同位置或不同子区域的视觉遮挡程度也可以不相同。若第一虚拟对象位于视觉遮挡区域内,先获取第一虚拟对象触发发声事件的位置,如获取第一虚拟对象触发发声事件时的坐标,根据坐标可以确定第一虚拟对象触发发声事件时所在的子区域,将该子区域的视觉遮挡程度所对应的显示间隔时长,确定为第一间隔时长,以便于按照第一间隔时长显示在该子区域中触发的发声事件的声纹标识。
在一些实施例中,在视觉遮挡区域为烟雾弹生成的烟雾的覆盖区域。在一些实施例中,覆盖区域的底面,是以烟雾弹的落地位置为中心点的底面。在一些实施例中,在覆盖区域内,垂直位置的视觉遮挡程度相同,因而,子区域可以基于覆盖区域的任意一个横截面(如底面)底面进行划分确定。如图8所示的视觉遮挡区域80,实际上是视觉遮挡区域80的底面。在一些实施例中,由于烟雾是从烟雾弹中向外扩散的,因而,距离烟雾弹的落地位置越近的区域,烟雾就越浓、视觉遮挡程度就越高;距离烟雾弹的落地位置越远的区域,烟雾就越少、视觉遮挡程度就越低。因此,子区域的划分方式可以是按照与烟雾弹的落地位置的距离进行划分的,与烟雾弹的落地位置的距离可以划分为多个连续距离范围,每一个距离范围就对应于一个子区域。如图10所示,覆盖区域100可以是圆柱形区域,覆盖区域100的底面可以是圆形,按照距离烟雾弹的落地位置101的距离,可以划分得到3个距离范围,从而得到三个子区域,按照与落地位置101的距离,从近到远分别为子区域102、子区域103、子区域104。显然,子区域102的视觉遮挡程度大于子区域103的视觉遮挡程度,子区域103的视觉遮挡程度大于子区域104的视觉遮挡程度。
在该实施例中,在视觉遮挡区域中,显示声纹标识的显示间隔时长也可以不相同,从而丰富视觉遮挡区域不同区域的差异化,丰富视觉遮挡区域的功能。同时,将视觉遮挡区域的不同子区域与声纹标识的显示相结合,使得该声纹标识相对于用户的显示方式更具多样性。
综上所述,本申请实施例提供的技术方案,通过根据视觉遮挡程度限制显示声纹标识的显示间隔时长,从而使得视觉遮挡程度越高的区域,声纹标识的显示频次就越低,视觉遮挡程度越低的区域,声纹标识的显示频次就越高,从而使得声纹标识的显示,与不同区域在视觉上的遮挡效果协调统一,不仅丰富了声纹标识的显示形式,同时也提升了用户体验。
在一些实施例中,上述步骤920,可以替换为如下步骤:
1、确定第一虚拟对象与虚拟环境中的第二虚拟对象的距离;
2、根据第一虚拟对象所在区域的视觉遮挡程度以及距离,确定声纹标识的振幅;
3、按照振幅,确定第一虚拟对象触发的发声事件对应的声纹标识;其中,在视觉遮挡程度相同的情况下,振幅与距离呈负相关关系;在距离相同的情况下,振幅与视觉遮挡程度呈负相关关系。
在一些实施例中,声纹标识可以是波形的声纹标识,波形的振幅可以用于表示发声事件对应音效的响度或音量,振幅越大,响度或音量就越高;振幅越小,响度或音量就越低。而响度和音量又与第一虚拟对象与第二虚拟对象的距离、以及第一虚拟对象所在区域的视觉遮挡程度有关,因而,需要综合这两个因素来确定声纹标识的振幅。
在一些实施例中,区域的视觉遮挡程度、距离以及声纹标识的振幅三者之间存在一一对应关系(或者函数关系)。示例性地,在确定或者获取到区域的视觉遮挡程度、距离之后,从对应关系中找到与该区域的视觉遮挡程度、距离所对应的振幅。示例性地,在确定或者获取到区域的视觉遮挡程度、距离之后,利用函数关系计算出与该区域的视觉遮挡程度、距离所对应的振幅。
在一些实施例中,振幅与距离呈负相关关系,振幅与视觉遮挡程度呈负相关关系,振幅、距离以及视觉遮挡程度这三者之间存在函数关系。示例性地,振幅=a*距离+b*视觉遮挡程度。其中,a和b为负数。
在一些实施例中,如图1的子图(a)、(b)所示,由于子图(a)中虚拟对象11所在区域12为非视觉遮挡区域、子图(b)中虚拟对象11所在区域为烟雾的覆盖区域13,即视觉遮挡区域,显然,区域12的视觉遮挡程度小于覆盖区域13的视觉遮挡程度,因此,在虚拟对象11与第二虚拟对象16距离相同的情况下,虚拟对象11在区域12内所触发发声事件的声纹标识17的振幅,就大于虚拟对象11在覆盖区域13内所触发发声事件的声纹标识18的振幅。
在一些实施例中,在确定第一虚拟对象触发的发声事件对应的声纹标识之后,显示该第一虚拟对象触发的发声事件对应的声纹标识。
在上述实现方式中,声纹标识的振幅与距离和视觉遮挡程度都呈负相关关系,虚拟对象在从视觉遮挡区域之外移动到视觉遮挡区域之内后,其对应触发的发声事件的声纹标识的显示的间隔时长会减小,从而提升声纹标识的显示方式的多样性和丰富性。同时,也提升了游戏内容的丰富性和趣味性,有助于吸引用户。
在一些实施例中,虚拟环境的显示画面的上层画面中显示有方位罗盘,方位罗盘用于指示虚拟环境中的第二虚拟对象在虚拟环境中的朝向,声纹标识对应于方位罗盘上的位置,用于指示声纹标识对应的发声事件的触发位置相对于第二虚拟对象的方向。
在一些实施例中,如图1所示,客户端在显示虚拟环境的同时,还可以显示有方位罗盘19。在一些实施例中,显示出来的方位罗盘部分,正中间的方位保持为第二虚拟对象的正面朝向的方位。在一些实施例中,每个声纹标识都可以对应于方位罗盘中的一个方向。例如,声纹标识垂直于方位罗盘的点所在的刻度对应的方向,就是声纹标识指示的方向。在一些实施例中,声纹标识可以显示在方位罗盘上。通过该实施例,声纹标识还可以用于指示发声事件对应于第二虚拟对象的方向,即用于指示第一虚拟对象对应于第二虚拟对象的方向,丰富了声纹标识的作用。
在一些实施例中,声纹标识在方位罗盘上对应的位置所指示的方向,与声纹标识对应的发声事件相对于第二虚拟对象的方向的差异为方向差,方向差与第一虚拟对象所在区域的视觉遮挡程度呈正相关关系。
在一些实施例中,在第一虚拟对象位于视觉遮挡区域内时,对应的声纹标识所指示的第一虚拟对象的方向,可以与实际方向存在偏差,即降低声纹标识所指示方向的精确度,从而使得用户不容易通过声纹标识来精确定位第一虚拟对象所在的位置,提升了视觉遮挡区域对区域内的虚拟对象的掩蔽效果。
在上述实现方式中,声纹标识可以用来指示方向,在第一虚拟对象位于视觉遮挡区域内的情况下,声纹标识也可以用于模糊用户对第一虚拟对象所在位置的感知和定位,从而丰富声纹标识的功能和作用;同时,也提升了视觉遮挡区域对区域内的虚拟对象的掩蔽效果。
需要说明的是,上述音效播放方法的实施例与声纹标识显示方法的实施例可以相结合,音效播放方法的实施例与声纹标识显示方法的实施例组合成的任一可行的实施例均在本申请的保护范围内。
下述为本申请装置实施例,可以用于执行本申请方法实施例。对于本申请装置实施例中未披露的细节,请参照本申请方法实施例。
请参考图11,其示出了本申请一个实施例提供的音效播放装置的框图。该装置具有实现上述音效播放方法示例的功能,所述功能可以由硬件实现,也可以由硬件执行相应的软件实现。该装置可以是上文介绍的终端设备,也可以设置在终端设备上。该装置1100可以包括:环境显示模块1110和音效播放模块1120。
所述环境显示模块1110,用于显示包含有第一虚拟对象的虚拟环境。
所述音效播放模块1120,用于在所述第一虚拟对象位于所述虚拟环境中的视觉遮挡区域内、且所述第一虚拟对象在所述视觉遮挡区域内触发发声事件的情况下,播放所述发声事件经过削弱处理后的音效,其中,所述视觉遮挡区域用于对区域内的虚拟元素产生遮挡效果,所述削弱处理用于削弱音效对于辨别所述第一虚拟对象所在位置的效果。
在一些实施例中,所述音效播放模块1120,包括:参数获取子模块和音效播放子模块。
所述参数获取子模块,用于获取所述发声事件初始的音效参数。
所述参数获取子模块,还用于基于所述发声事件初始的音效参数,对所述发声事件初始的音效执行所述削弱处理,得到所述发声事件削弱后的音效参数。
所述音效播放子模块,用于按照所述至少一次发声事件削弱后的音效参数,播放所述至少一次发声事件的音效。
在一些实施例中,所述音效参数包括音量值;所述参数获取子模块,用于:基于所述发声事件初始的音量值,确定所述发声事件削弱后的音量值,其中,所述发声事件削弱后的音量值低于所述发声事件初始的音量值。
在一些实施例中,所述音效参数包括空间参数;所述参数获取子模块,用于:基于所述发声事件初始的空间参数,确定所述发声事件削弱后的空间参数,其中,所述削弱后的空间参数对于辨别发声位置所在的方向和距离的效果,弱于所述初始的空间参数对于辨别发声位置所在的方向和距离的效果。
在一些实施例中,所述空间参数包括至少两个声道各自的音效之间的时间差和音量差;所述参数获取子模块,用于:基于所述第一发声事件的所述至少两个声道各自的音效之间初始的时间差或音量差,确定所述发声事件削弱后的时间差或音量差。
在一些实施例中,所述参数获取子模块,用于:基于所述视觉遮挡区域对应的频率限制信息,确定所述第一发声事件属于音效播放事件还是音效隐藏事件,所述频率限制信息用于限制播放所述发声事件的音效的频率,所述音效播放事件是指播放对应音效的发声事件,所述音效隐藏事件是指隐藏对应音效的发声事件;
所述音效播放子模块,用于:
在所述第一发声事件属于所述音效播放事件的情况下,播放所述第一发声事件的音效;
其中,在所述发声事件属于所述音效隐藏事件的情况下,所述发声事件的音效不被播放。
在一些实施例中,所述频率限制信息包括以下至少之一:
在第一时长内,所述音效播放事件的数量小于或等于第一阈值;
每n次连续的发声事件中存在m个发声事件属于所述音效播放事件,所述n、m为大于1的整数,所述m小于所述n;
所述音效播放事件或所述音效隐藏事件是随机确定的。
在一些实施例中,所述视觉遮挡区域包括所述虚拟环境中的虚拟烟雾装置所生成的烟雾的覆盖区域,所述覆盖区域的底面的中心点,为所述虚拟烟雾装置生成所述烟雾的位置。
在一些实施例中,所述视觉遮挡区域包括视觉遮挡程度不同的至少两个子区域,同一子区域中不同位置的视觉遮挡程度相同;在所述发声事件的发声位置,位于所述至少两个子区域中的第一子区域的情况下,所述发声事件经过削弱处理后的音效是基于所述第一子区域的视觉遮挡程度确定的;其中,所述发声事件经过削弱处理后的音效对于辨别所述第一虚拟对象所在位置的削弱效果,与所述视觉遮挡程度呈正相关关系。
在一些实施例中,所述音效播放模块1120,还用于:
在所述第一虚拟对象从所述视觉遮挡区域中移出,或者所述视觉遮挡区域取消的情况下,若所述第一虚拟对象触发所述发声事件,则播放所述发声事件的初始的音效。
在一些实施例中,所述音效播放模块1120,还用于:所述发声事件经过削弱处理后的音效是基于所述发声事件的类型确定的;其中,对于不同类型的发声事件,对应的削弱处理方式不同。
在一些实施例中,所述音效播放模块1120,用于:
在所述发声事件为位置移动类型的发声事件的情况下,所述发声事件经过削弱处理后的音效是所述发声事件经过第一削弱处理后的音效,所述位置移动类型的发声事件用于移动所述第一虚拟对象的位置;
在所述发声事件为攻击类型的发声事件的情况下,所述发声事件经过削弱处理后的音效是所述发声事件经过第二削弱处理后的音效,所述攻击类型的发声事件用于攻击所述虚拟环境中的第二虚拟对象;
其中,所述第一削弱处理对音效的削弱程度,大于所述第二削弱处理对音效的削弱程度。
综上所述,本申请实施例提供的技术方案,在虚拟对象位于虚拟环境的视觉遮挡区域内的情况下,对虚拟对象在视觉遮挡区域内触发的发声事件的音效进行削弱处理,以使得播放出来的经过削弱处理后的音效在辨别发声位置上的效果被削弱。考虑到视觉遮挡(如存在障碍物)可能会阻碍声音传播(该障碍物会使声音发生反射、折射等等),因此将视觉上的遮挡与听觉上的音效削弱有机结合,能够模拟出在视觉遮挡情况下更加真实的音效。不仅丰富了播放的音效的多样性,还给予用户身临其境之感,提高了用户的对局体验。该音效仅被削弱,而非完全取消,仍然可以基于该音效感知到第一虚拟对象的位置。另外,播放的削弱处理后的音效,使得第一虚拟对象的位置更加难辨,在提升音效丰富性的同时,丰富了人机互动形式,提升了游戏趣味性。另外,本申请实施例中,视觉遮挡区域不仅可以在视觉上遮挡住位于视觉遮挡区域内的虚拟对象,还可以通过对音效的削弱处理从听觉上模糊虚拟对象的位置,丰富了视觉遮挡区域的功能。
请参考图12,其示出了本申请一个实施例提供的声纹标识显示装置的框图。该装置具有实现上述声纹标识显示方法示例的功能,所述功能可以由硬件实现,也可以由硬件执行相应的软件实现。该装置可以是上文介绍的终端设备,也可以设置在终端设备上。该装置1200可以包括:环境显示模块1210和标识显示模块1220。
所述环境显示模块1210,用于显示包含有第一虚拟对象的虚拟环境。
所述标识显示模块1220,用于基于所述第一虚拟对象所在区域的视觉遮挡程度,显示所述第一虚拟对象触发的发声事件对应的声纹标识,所述视觉遮挡程度用于指示对区域内的虚拟元素产生的遮挡效果的程度,所述声纹标识用于表示所述第一虚拟对象的方向和位置,相邻两个声纹标识之间的显示间隔时长,与所述第一虚拟对象所在区域的视觉遮挡程度呈正相关关系。
在一些实施例中,所述标识显示模块1220,用于:
在所述第一虚拟对象位于所述虚拟环境的视觉遮挡区域内的情况下,按照第一间隔时长显示所述声纹标识,所述视觉遮挡区域用于对区域内的虚拟元素产生遮挡效果;
在所述第一虚拟对象位于所述虚拟环境的非视觉遮挡区域内的情况下,按照第二间隔时长显示所述声纹标识,所述非视觉遮挡区域是除所述视觉遮挡区域之外的区域;
其中,所述视觉遮挡区域的视觉遮挡程度,高于所述非视觉遮挡区域的视觉遮挡程度,所述第一间隔时长大于所述第二间隔时长。
在一些实施例中,所述视觉遮挡区域包括视觉遮挡程度不同的至少两个子区域,同一子区域中不同位置的视觉遮挡程度相同;
在一些实施例中,所述标识显示模块1220,用于:
在所述第一虚拟对象位于所述视觉遮挡区域内的情况下,获取所述第一虚拟对象触发所述发声事件的位置;
根据所述第一虚拟对象触发所述发声事件的位置,确定所述第一虚拟对象触发所述发声事件时所在的子区域;
将所述第一虚拟对象触发所述发声事件时所在的子区域对应的显示间隔时长,确定为所述第一间隔时长,并按照所述第一间隔时长显示所述声纹标识。
在一些实施例中,所述标识显示模块1220,用于:
确定所述第一虚拟对象与所述虚拟环境中的第二虚拟对象的距离;
根据第一虚拟对象所在区域的视觉遮挡程度以及所述距离,确定所述声纹标识的振幅;
按照所述振幅,确定所述第一虚拟对象触发的发声事件对应的声纹标识;
其中,在视觉遮挡程度相同的情况下,所述振幅与所述距离呈负相关关系;在距离相同的情况下,所述振幅与所述视觉遮挡程度呈负相关关系。
在一些实施例中,所述虚拟环境的显示画面的上层画面中显示有方位罗盘,所述方位罗盘用于指示所述虚拟环境中的第二虚拟对象在所述虚拟环境中的朝向,所述声纹标识对应于所述方位罗盘上的位置,用于指示所述声纹标识对应的发声事件的触发位置相对于所述第二虚拟对象的方向。
在一些实施例中,所述声纹标识在所述方位罗盘上对应的位置所指示的方向,与所述声纹标识对应的发声事件相对于所述第二虚拟对象的方向的差异为方向差,所述方向差与所述第一虚拟对象所在区域的视觉遮挡程度呈正相关关系。
综上所述,本申请实施例提供的技术方案,通过根据视觉遮挡程度限制显示声纹标识的显示间隔时长,从而使得视觉遮挡程度越高的区域,声纹标识的显示频次就越低,视觉遮挡程度越低的区域,声纹标识的显示频次就越高,从而使得声纹标识的显示,与不同区域在视觉上的遮挡效果协调统一,同时也提升了用户体验。
需要说明的是,上述实施例提供的装置,在实现其功能时,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将设备的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。另外,上述实施例提供的装置与方法实施例属于同一构思,其具体实现过程详见方法实施例,这里不再赘述。
请参考图13,其示出了本申请一个实施例提供的终端设备1300的结构框图。该终端设备1300可以是诸如手机、平板电脑、游戏主机、电子书阅读器、多媒体播放设备、可穿戴设备、PC等电子设备。该终端设备用于实施上述实施例中提供的音效播放方法或声纹标识显示方法。该终端设备可以是图2所示计算机系统中的终端设备14。具体来讲:
通常,终端设备1300包括有:处理器1301和存储器1302。
处理器1301可以包括一个或多个处理核心,比如4核心处理器、8核心处理器等。处理器1301可以采用DSP(Digital Signal Processing,数字信号处理)、FPGA(Field Programmable Gate Array,现场可编程门阵列)、PLA(Programmable Logic Array,可编程逻辑阵列)中的至少一种硬件形式来实现。处理器1301也可以包括主处理器和协处理器,主处理器是用于对在唤醒状态下的数据进行处理的处理器,也称CPU(Central Processing Unit,中央处理器);协处理器是用于对在待机状态下的数据进行处理的低功耗处理器。在一些实施例中,处理器1301可以在集成有GPU(Graphics Processing Unit,图像处理器),GPU用于负责显示屏所需要显示的内容的渲染和绘制。一些实施例中,处理器1301还可以包括AI(Artificial Intelligence,人工智能)处理器,该AI处理器用于处理有关机器学习的计算操作。
存储器1302可以包括一个或多个计算机可读存储介质,该计算机可读存储介质可以是非暂态的。存储器1302还可包括高速随机存取存储器,以及非易失性存储器,比如一个或多个磁盘存储设备、闪存存储设备。在一些实施例中,存储器1302中的非暂态的计算机可读存储介质用于存储计算机程序,且经配置以由一个或者一个以上处理器执行,以实现上述音效播放方法或声纹标识显示方法。
在一些实施例中,终端设备1300还可选包括有:外围设备接口1303和至少一个外围设备。处理器1301、存储器1302和外围设备接口1303之间可以通过总线或信号线相连。各个外围设备可以通过总线、信号线或电路板与外围设备接口1303相连。具体地,外围设备包括:射频电路1304、显示屏1305、音频电路1306和电源1307中的至少一种。
本领域技术人员可以理解,图13中示出的结构并不构成对终端设备1300的限定,可以包括比图示更多或更少的组件,或者组合某些组件,或者采用不同的组件布置。
在示例性实施例中,还提供了一种计算机可读存储介质,所述存储介质中存储有计算机程序,所述计算机程序在被处理器执行时以实现上述音效播放方法或实现上述声纹标识显示方法。
可选地,该计算机可读存储介质可以包括:ROM(Read-Only Memory,只读存储器)、RAM(Random-Access Memory,随机存储器)、SSD(Solid State Drives,固态硬盘)或光盘等。其中,随机存取记忆体可以包括ReRAM(Resistance Random Access Memory,电阻式随机存取记忆体)和DRAM(Dynamic Random Access Memory,动态随机存取存储器)。
在示例性实施例中,还提供了一种计算机程序产品,该计算机程序产品包括计算机程序,该计算机程序存储在计算机可读存储介质中。计算机设备的处理器从计算机可读存储介质读取该计算机程序,处理器执行该计算机程序,使得该计算机设备执行上述音效播放方法或执行上述声纹标识显示方法。
需要进行说明的是,本申请在收集用户的相关数据之前以及在收集用户的相关数据的过程中,都可以显示提示界面、弹窗或输出语音提示信息,该提示界面、弹窗或语音提示信息用于提示用户当前正在搜集其相关数据,使得本申请仅仅在获取到用户对该提示界面或者弹窗发出的确认操作后,才开始执行获取用户相关数据的相关步骤,否则(即未获取到用户对该提示界面或者弹窗发出的确认操作时),结束获取用户相关数据的相关步骤,即不获取用户的相关数据。换句话说,本申请所采集的所有用户数据都是在用户同意并授权的情况下进行采集的,且相关用户数据的收集、使用和处理需要遵守相关国家和地区的相关法律法规和标准。
应当理解的是,在本文中提及的“多个”是指两个或两个以上。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。字符“/”一般表示前后关联对象是一种“或”的关系。
以上所述仅为本申请的示例性实施例,并不用以限制本申请,凡在本申请的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。

Claims (22)

  1. 一种音效播放方法,所述方法由终端设备执行,所述方法包括:
    显示包含有第一虚拟对象的虚拟环境;
    在所述第一虚拟对象位于所述虚拟环境中的视觉遮挡区域内、且所述第一虚拟对象在所述视觉遮挡区域内触发发声事件的情况下,播放所述发声事件经过削弱处理后的音效,其中,所述视觉遮挡区域用于对区域内的虚拟元素产生遮挡效果,所述削弱处理用于削弱音效对于辨别所述第一虚拟对象所在位置的效果。
  2. 根据权利要求1所述的方法,其中,所述播放所述发声事件经过削弱处理后的音效,包括:
    获取所述发声事件初始的音效参数;
    基于所述发声事件初始的音效参数,对所述发声事件初始的音效执行所述削弱处理,得到所述发声事件削弱后的音效参数;
    按照所述发声事件削弱后的音效参数,播放所述发声事件的音效。
  3. 根据权利要求2所述的方法,其中,所述音效参数包括音量值;
    所述基于所述发声事件初始的音效参数,对所述发声事件初始的音效执行所述削弱处理,得到所述发声事件削弱后的音效参数,包括:
    基于所述发声事件初始的音量值,确定所述发声事件削弱后的音量值,其中,所述发声事件削弱后的音量值低于所述发声事件初始的音量值。
  4. 根据权利要求2所述的方法,其中,所述音效参数包括空间参数;
    所述基于所述发声事件初始的音效参数,对所述发声事件初始的音效执行所述削弱处理,得到所述发声事件削弱后的音效参数,包括:
    基于所述发声事件初始的空间参数,确定所述发声事件削弱后的空间参数,其中,所述削弱后的空间参数对于辨别发声位置所在的方向和距离的效果,弱于所述初始的空间参数对于辨别发声位置所在的方向和距离的效果。
  5. 根据权利要求4所述的方法,其中,所述空间参数包括至少两个声道各自的音效之间的时间差和音量差;
    所述基于所述发声事件初始的空间参数,确定所述发声事件削弱后的空间参数,包括:
    基于所述发声事件的所述至少两个声道各自的音效之间初始的时间差或音量差,确定所述发声事件削弱后的时间差或音量差。
  6. 根据权利要求2所述的方法,其中,所述基于所述发声事件初始的音效参数,对所述发声事件初始的音效执行所述削弱处理,得到所述发声事件削弱后的音效参数,包括:
    基于所述视觉遮挡区域对应的频率限制信息,确定所述发声事件属于音效播放事件还是音效隐藏事件,所述频率限制信息用于限制播放所述发声事件的音效的频率,所述音效播放事件是指播放对应音效的发声事件,所述音效隐藏事件是指隐藏对应音效的发声事件;
    所述按照所述发声事件削弱后的音效参数,播放所述发声事件的音效,包括:
    在所述发声事件属于所述音效播放事件的情况下,播放所述发声事件的音效;
    其中,在所述发声事件属于所述音效隐藏事件的情况下,所述发声事件的音效不被播放。
  7. 根据权利要求1至6任一项所述的方法,其中,所述视觉遮挡区域包括所述虚拟环境中的虚拟烟雾装置所生成的烟雾的生效区域。
  8. 根据权利要求1至7任一项所述的方法,其中,所述视觉遮挡区域包括视觉遮挡程度不同的至少两个子区域,同一子区域中不同位置的视觉遮挡程度相同;
    在所述发声事件的发声位置,位于所述至少两个子区域中的第一子区域的情况下,所述发声事件经过削弱处理后的音效是基于所述第一子区域的视觉遮挡程度确定的;
    其中,所述发声事件经过削弱处理后的音效对于辨别所述第一虚拟对象所在位置的削弱效果,与所述视觉遮挡程度呈正相关关系。
  9. 根据权利要求1至8任一项所述的方法,其中,
    所述发声事件经过削弱处理后的音效是基于所述发声事件的类型确定的;
    其中,对于不同类型的发声事件,对应的削弱处理方式不同。
  10. 根据权利要求9所述的方法,其中,
    在所述发声事件为位置移动类型的发声事件的情况下,所述发声事件经过削弱处理后的音效是所述发声事件经过第一削弱处理后的音效,所述位置移动类型的发声事件用于移动所述第一虚拟对象的位置;
    在所述发声事件为攻击类型的发声事件的情况下,所述发声事件经过削弱处理后的音效是所述发声事件经过第二削弱处理后的音效,所述攻击类型的发声事件用于攻击所述虚拟环境中的第二虚拟对象;
    其中,所述第一削弱处理对音效的削弱程度,大于所述第二削弱处理对音效的削弱程度。
  11. 一种声纹标识显示方法,所述方法由终端设备执行,所述方法包括:
    显示包含有第一虚拟对象的虚拟环境;
    基于所述第一虚拟对象所在区域的视觉遮挡程度,显示所述第一虚拟对象触发的发声事件对应的声纹标识,所述视觉遮挡程度用于指示对区域内的虚拟元素产生的遮挡效果的程度,所述声纹标识用于表示所述第一虚拟对象的方位,相邻两个声纹标识之间的显示间隔时长,与所述第一虚拟对象所在区域的视觉遮挡程度呈正相关关系。
  12. 根据权利要求11所述的方法,其中,所述基于所述第一虚拟对象所在区域的视觉遮挡程度,显示所述第一虚拟对象触发的发声事件对应的声纹标识,包括:
    在所述第一虚拟对象位于所述虚拟环境的视觉遮挡区域内的情况下,按照第一间隔时长显示所述声纹标识,所述视觉遮挡区域用于对区域内的虚拟元素产生遮挡效果;
    在所述第一虚拟对象位于所述虚拟环境的非视觉遮挡区域内的情况下,按照第二间隔时长显示所述声纹标识,所述非视觉遮挡区域是除所述视觉遮挡区域之外的区域;
    其中,所述视觉遮挡区域的视觉遮挡程度,高于所述非视觉遮挡区域的视觉遮挡程度,所述第一间隔时长大于所述第二间隔时长。
  13. 根据权利要求12所述的方法,其中,所述视觉遮挡区域包括视觉遮挡程度不同的至少两个子区域,同一子区域中不同位置的视觉遮挡程度相同;
    所述在所述第一虚拟对象位于所述虚拟环境的视觉遮挡区域内的情况下,按照第一间隔时长显示所述声纹标识,包括:
    在所述第一虚拟对象位于所述视觉遮挡区域内的情况下,获取所述第一虚拟对象触发所述发声事件的位置;
    根据所述第一虚拟对象触发所述发声事件的位置,确定所述第一虚拟对象触发所述发声事件时所在的子区域;
    将所述第一虚拟对象触发所述发声事件时所在的子区域对应的显示间隔时长,确定为所述第一间隔时长,并按照所述第一间隔时长显示所述声纹标识。
  14. 根据权利要求12或13所述的方法,其中,所述视觉遮挡区域包括所述虚拟环境中的虚拟烟雾装置所生成的烟雾的生效区域。
  15. 根据权利要求11至14任一项所述的方法,其中,所述方法还包括:
    确定所述第一虚拟对象与所述虚拟环境中的第二虚拟对象的距离;
    根据第一虚拟对象所在区域的视觉遮挡程度以及所述距离,确定所述声纹标识的振幅;
    按照所述振幅,确定所述第一虚拟对象触发的发声事件对应的声纹标识;
    其中,在视觉遮挡程度相同的情况下,所述振幅与所述距离呈负相关关系;在距离相同的情况下,所述振幅与所述视觉遮挡程度呈负相关关系。
  16. 根据权利要求11至15任一项所述的方法,其中,所述虚拟环境的显示画面的上层画面中显示有方位罗盘,所述方位罗盘用于指示所述虚拟环境中的第二虚拟对象在所述虚拟环境中的朝向,所述声纹标识对应于所述方位罗盘上的位置,用于指示所述声纹标识对应的发声事件的触发位置相对于所述第二虚拟对象的方向。
  17. 根据权利要求16所述的方法,其中,所述声纹标识在所述方位罗盘上对应的位置所指示的方向,与所述声纹标识对应的发声事件相对于所述第二虚拟对象的方向的差异为方向差,所述方向差与所述第一虚拟对象所在区域的视觉遮挡程度呈正相关关系。
  18. 一种音效播放装置,所述装置包括:
    环境显示模块,用于显示包含有第一虚拟对象的虚拟环境;
    音效播放模块,用于在所述第一虚拟对象位于所述虚拟环境中的视觉遮挡区域内、且所述第一虚拟对象在所述视觉遮挡区域内触发发声事件的情况下,播放所述发声事件经过削弱处理后的音效,其中,所述视觉遮挡区域用于对区域内的虚拟元素产生遮挡效果,所述削弱处理用于削弱音效对于辨别所述第一虚拟对象所在位置的效果。
  19. 一种声纹标识显示装置,所述装置包括:
    环境显示模块,用于显示包含有第一虚拟对象的虚拟环境;
    标识显示模块,用于基于所述第一虚拟对象所在区域的视觉遮挡程度,显示所述第一虚拟对象触发的发声事件对应的声纹标识,所述视觉遮挡程度用于指示对区域内的虚拟元素产生的遮挡效果的程度,所述声纹标识用于表示所述第一虚拟对象的方向和位置,相邻两个声纹标识之间的显示间隔时长,与所述第一虚拟对象所在区域的视觉遮挡程度呈正相关关系。
  20. 一种终端设备,所述终端设备包括处理器和存储器,所述存储器中存储有计算机程序,所述计算机程序由所述处理器加载并执行以实现如上述权利要求1至10任一项所述的音效播放方法,或实现如上述权利要求11至17任一项所述的声纹标识显示方法。
  21. 一种计算机可读存储介质,所述计算机可读存储介质中存储有计算机程序,所述计算机程序由处理器加载并执行以实现如上述权利要求1至10任一项所述的音效播放方法,或实现如上述权利要求11至17任一项所述的声纹标识显示方法。
  22. 一种计算机程序产品,所述计算机程序产品包括计算机程序,所述计算机程序存储在计算机可读存储介质中,处理器从所述计算机可读存储介质读取并执行所述计算机程序,以实现如权利要求1至10任一项所述的音效播放方法,或实现如上述权利要求11至17任一项所述的声纹标识显示方法。
PCT/CN2025/081591 2024-03-27 2025-03-10 音效播放方法、声纹标识显示方法、装置及终端设备 Pending WO2025201016A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202410376871.7 2024-03-27
CN202410376871.7A CN120714228A (zh) 2024-03-27 2024-03-27 音效播放方法、声纹标识显示方法、装置及终端设备

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US19/646,099 Continuation US20260241283A1 (en) 2024-03-27 2026-04-13 Method for playing sound effect, terminal device and storage medium

Publications (1)

Publication Number Publication Date
WO2025201016A1 true WO2025201016A1 (zh) 2025-10-02

Family

ID=97167722

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2025/081591 Pending WO2025201016A1 (zh) 2024-03-27 2025-03-10 音效播放方法、声纹标识显示方法、装置及终端设备

Country Status (2)

Country Link
CN (1) CN120714228A (zh)
WO (1) WO2025201016A1 (zh)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160066119A1 (en) * 2013-08-13 2016-03-03 Tencent Technology (Shenzhen) Company Limited Sound effect processing method and device thereof
CN107179908A (zh) * 2017-05-16 2017-09-19 网易(杭州)网络有限公司 音效调整方法、装置、电子设备及计算机可读存储介质
CN107890673A (zh) * 2017-09-30 2018-04-10 网易(杭州)网络有限公司 补偿声音信息的视觉显示方法及装置、存储介质、设备
CN108579084A (zh) * 2018-04-27 2018-09-28 腾讯科技(深圳)有限公司 虚拟环境中的信息显示方法、装置、设备及存储介质
CN111282271A (zh) * 2018-12-06 2020-06-16 网易(杭州)网络有限公司 移动终端游戏中的声音渲染方法、装置和电子设备
CN112245912A (zh) * 2020-11-11 2021-01-22 腾讯科技(深圳)有限公司 虚拟场景中的声音提示方法、装置、设备及存储介质
CN114887327A (zh) * 2022-04-14 2022-08-12 网易(杭州)网络有限公司 音效的播放控制方法、装置及电子设备
CN115762566A (zh) * 2022-11-18 2023-03-07 珠海金山数字网络科技有限公司 音频处理方法及装置

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160066119A1 (en) * 2013-08-13 2016-03-03 Tencent Technology (Shenzhen) Company Limited Sound effect processing method and device thereof
CN107179908A (zh) * 2017-05-16 2017-09-19 网易(杭州)网络有限公司 音效调整方法、装置、电子设备及计算机可读存储介质
CN107890673A (zh) * 2017-09-30 2018-04-10 网易(杭州)网络有限公司 补偿声音信息的视觉显示方法及装置、存储介质、设备
CN108579084A (zh) * 2018-04-27 2018-09-28 腾讯科技(深圳)有限公司 虚拟环境中的信息显示方法、装置、设备及存储介质
CN111282271A (zh) * 2018-12-06 2020-06-16 网易(杭州)网络有限公司 移动终端游戏中的声音渲染方法、装置和电子设备
CN112245912A (zh) * 2020-11-11 2021-01-22 腾讯科技(深圳)有限公司 虚拟场景中的声音提示方法、装置、设备及存储介质
CN114887327A (zh) * 2022-04-14 2022-08-12 网易(杭州)网络有限公司 音效的播放控制方法、装置及电子设备
CN115762566A (zh) * 2022-11-18 2023-03-07 珠海金山数字网络科技有限公司 音频处理方法及装置

Also Published As

Publication number Publication date
CN120714228A (zh) 2025-09-30

Similar Documents

Publication Publication Date Title
TWI818351B (zh) 多人在線對戰程式中的消息發送方法、裝置、終端及媒體
JP7642731B2 (ja) 情報表示方法、装置、機器及びプログラム
CN111760282B (zh) 界面显示方法、装置、终端及存储介质
US12226694B2 (en) Method and apparatus for acquiring position in virtual scene, device, medium and program product
CN112221135B (zh) 画面显示方法、装置、设备以及存储介质
CN112295228B (zh) 虚拟对象的控制方法、装置、电子设备及存储介质
CN114887327B (zh) 音效的播放控制方法、装置及电子设备
CN114247146B (zh) 一种游戏的显示控制方法、装置、电子设备和介质
CN113599816A (zh) 画面显示方法、装置、终端及存储介质
US20240037885A1 (en) Method and apparatus for controlling virtual object, electronic device, storage medium, and program product
JP2024506920A (ja) 仮想対象の制御方法、装置、機器、及びプログラム
Summers et al. Creating immersive and aesthetic auditory spaces in virtual reality
WO2023231557A1 (zh) 虚拟对象的互动方法、装置、设备、存储介质及程序产品
CN114425163B (zh) 虚拟对象的控制方法、装置、终端、存储介质及程序产品
US20250135341A1 (en) Interaction method and apparatus based on virtual objects, electronic device, and storage medium
US20250041719A1 (en) Special effect display method and apparatus, electronic device, and storage medium
US20240325892A1 (en) System, method, and program for character to encounter another character in virtual space
JP7855475B2 (ja) ゲームシステム及びプログラム
CN120714228A (zh) 音效播放方法、声纹标识显示方法、装置及终端设备
CN119902982B (zh) 游戏测试处理方法、装置、程序产品与电子设备
US20250363762A1 (en) Method and apparatus for interaction in virtual scene, electronic device, computer-readable storage medium, and computer program product
CN121550679A (zh) 角色闪避控制方法及其装置、设备、介质
CN120960755A (zh) 画面显示方法、装置、终端设备及存储介质
JP2025111306A (ja) 音処理プログラム、音処理方法、及び音処理装置
HK40048710A (zh) 虚拟对象的控制方法、装置、设备及计算机可读存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 25775573

Country of ref document: EP

Kind code of ref document: A1