CN112604279A - Special effect display method and device - Google Patents

Special effect display method and device Download PDF

Info

Publication number
CN112604279A
CN112604279A CN202011603967.0A CN202011603967A CN112604279A CN 112604279 A CN112604279 A CN 112604279A CN 202011603967 A CN202011603967 A CN 202011603967A CN 112604279 A CN112604279 A CN 112604279A
Authority
CN
China
Prior art keywords
special effect
target
displayed
size
displaying
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
CN202011603967.0A
Other languages
Chinese (zh)
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.)
Guangzhou Xishanju Network Technology Co ltd
Zhuhai Kingsoft Online Game Technology Co Ltd
Original Assignee
Guangzhou Xishanju Network Technology Co ltd
Zhuhai Kingsoft Online Game Technology 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 Guangzhou Xishanju Network Technology Co ltd, Zhuhai Kingsoft Online Game Technology Co Ltd filed Critical Guangzhou Xishanju Network Technology Co ltd
Priority to CN202011603967.0A priority Critical patent/CN112604279A/en
Publication of CN112604279A publication Critical patent/CN112604279A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/50Controlling the output signals based on the game progress
    • A63F13/52Controlling the output signals based on the game progress involving aspects of the displayed game scene
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/55Controlling game characters or game objects based on the game progress
    • A63F13/56Computing the motion of game characters with respect to other game characters, game objects or elements of the game scene, e.g. for simulating the behaviour of a group of virtual soldiers or for path finding
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/60Generating or modifying game content before or while executing the game program, e.g. authoring tools specially adapted for game development or game-integrated level editor

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The application provides a special effect display method and a device, wherein the special effect display method comprises the following steps: determining a target position for displaying a special effect; acquiring a target distance between a virtual lens and the target position in a virtual scene; and adjusting the size of the special effect to be displayed based on the target distance to obtain a target special effect, and displaying the target special effect at the target position. In the embodiment of the application, the sizes of the displayed target special effects are different according to different target distances, but the same effect can be achieved in the aspect of visual effect due to different target positions, so that the displayed target special effects cannot be clearly seen and cannot be completely displayed on a screen, the special effect display can be flexibly performed, the effect of the special effect display is improved, and the use experience of a user is improved.

Description

Special effect display method and device
Technical Field
The present application relates to the field of internet technologies, and in particular, to a special effect display method and apparatus, a computing device, and a computer-readable storage medium.
Background
With the development of internet technology, the development of online games is better and better, online games are more and more popular, the demands of users are more and more, the performance requirements of users on online games are higher and higher, and especially in the aspect of game screen display, users expect to see exquisite and cool game screens. In order to enrich game content and enhance the visual effect of game pictures, a large amount of special game effects are usually added into a game scene.
In a Three-Dimensional game scene, a 3D (Three-Dimensional) special effect is used, a certain distance exists between the position of a virtual lens in the 3D scene and other positions except the position in the game scene, when special effect display is carried out, the same special effect is displayed under the same condition, but the displayed special effect has different visual effects due to different distances. When the distance is long, the displayed special effect looks small, and the corresponding effect on the screen is difficult to achieve and even is unclear; and when the distance is close, the displayed special effect looks large and can not be completely displayed on the screen. Therefore, the special effect display effect of the game can be reduced, and the use experience of the user is further reduced.
Disclosure of Invention
In view of this, embodiments of the present application provide a special effect display method and apparatus, a computing device, and a computer-readable storage medium, so as to solve technical defects in the prior art.
According to a first aspect of embodiments of the present application, there is provided a special effect display method, including:
determining a target position for displaying a special effect;
acquiring a target distance between a virtual lens and the target position in a virtual scene;
and adjusting the size of the special effect to be displayed based on the target distance to obtain a target special effect, and displaying the target special effect at the target position.
Optionally, the determining a target position for displaying a special effect includes:
receiving a processing operation for a target object;
if the processing operation comprises displaying a special effect, determining the position of the target object;
and taking the position of the target object as the target position.
Optionally, the acquiring a target distance between a virtual lens in a virtual scene and the target position includes:
acquiring the lens position of the virtual lens in the virtual scene;
determining the target distance based on the lens position and the target position.
Optionally, before the adjusting the size of the to-be-displayed special effect based on the target distance to obtain the target special effect, the method includes:
and acquiring the size of the template pixel of the special effect to be displayed to obtain the size of the special effect to be displayed.
Optionally, the obtaining a template pixel size of the to-be-displayed special effect includes:
acquiring the multimedia file with the special effect to be displayed, and acquiring metadata of the special effect to be displayed from the multimedia file;
and acquiring the size of the template pixel of the special effect to be displayed from the metadata of the special effect to be displayed.
Optionally, the processing operation includes a special effect identifier of a special effect to be displayed, and the obtaining the multimedia file of the special effect to be displayed includes:
sending a file acquisition request to a server, wherein the file acquisition request comprises the special effect identification;
and receiving the multimedia file of the special effect to be displayed corresponding to the special effect identification acquired by the server based on the file acquisition request.
Optionally, the adjusting the size of the to-be-displayed special effect based on the target distance to obtain the target special effect includes:
acquiring the corresponding relation between the target distance and the scaling;
determining a target scaling of the special effect to be displayed based on the corresponding relation;
and adjusting the size of the special effect to be displayed based on the target scaling to obtain the target special effect.
Optionally, the adjusting the size of the special effect to be displayed based on the target scaling to obtain the target special effect includes:
determining a target size of the special effect to be displayed based on the target scaling and the size of the special effect to be displayed;
and taking the special effect to be displayed with the size as the target special effect.
Optionally, the displaying the target special effect at the target position includes:
and displaying a display window of the target special effect at the target position according to the target size, and displaying the target special effect through the display window.
According to a second aspect of embodiments of the present application, there is provided a special effects display apparatus including:
a determination module configured to determine a target location at which to display the special effect;
an acquisition module configured to acquire a target distance between a virtual lens in a virtual scene and the target position;
and the display module is configured to adjust the size of the special effect to be displayed based on the target distance to obtain a target special effect, and display the target special effect at the target position.
Optionally, the determining module is configured to:
receiving a processing operation for a target object;
if the processing operation comprises displaying a special effect, determining the position of the target object;
and taking the position of the target object as the target position.
Optionally, the obtaining module is configured to:
acquiring the lens position of the virtual lens in the virtual scene;
determining the target distance based on the lens position and the target position.
Optionally, the display module is further configured to:
and acquiring the size of the template pixel of the special effect to be displayed to obtain the size of the special effect to be displayed.
Optionally, the display module is configured to:
acquiring the multimedia file with the special effect to be displayed, and acquiring metadata of the special effect to be displayed from the multimedia file;
and acquiring the size of the template pixel of the special effect to be displayed from the metadata of the special effect to be displayed.
Optionally, the display module is configured to:
the processing operation comprises a special effect identifier of a special effect to be displayed, and a file acquisition request is sent to a server, wherein the file acquisition request comprises the special effect identifier;
and receiving the multimedia file of the special effect to be displayed corresponding to the special effect identification acquired by the server based on the file acquisition request.
Optionally, the display module is configured to:
acquiring the corresponding relation between the target distance and the scaling;
determining a target scaling of the special effect to be displayed based on the corresponding relation;
and adjusting the size of the special effect to be displayed based on the target scaling to obtain the target special effect.
Optionally, the display module is configured to:
determining a target size of the special effect to be displayed based on the target scaling and the size of the special effect to be displayed;
and taking the special effect to be displayed with the size as the target special effect.
Optionally, the display module is configured to:
and displaying a display window of the target special effect at the target position according to the target size, and displaying the target special effect through the display window.
According to a third aspect of embodiments of the present application, there is provided a computing device comprising a memory, a processor, and computer instructions stored on the memory and executable on the processor, the processor implementing the steps of the special effects display method described above when executing the instructions.
According to a fourth aspect of embodiments of the present application, there is provided a computer-readable storage medium storing computer instructions, which when executed by a processor, implement the steps of the special effects display method described above.
The special effect display method provided by the embodiment of the application determines the target position for displaying the special effect; acquiring a target distance between a virtual lens and the target position in a virtual scene; and adjusting the size of the special effect to be displayed based on the target distance to obtain a target special effect, and displaying the target special effect at the target position. That is, in the embodiment of the present application, the size of the to-be-displayed special effect may be adjusted, and the to-be-displayed special effect may be adjusted according to the target distance between the virtual lens and the position where the special effect is displayed, and then the target special effects of different sizes may be displayed at the target position, so that the displayed target special effects may have different sizes for different target distances, but due to different target positions, the same effect may be achieved in terms of visual effect, so that the displayed target special effect may not be unclear or may not be completely displayed on the screen, and the special effect display may be performed more flexibly, thereby improving the effect of the special effect display, and further improving the user experience.
Drawings
FIG. 1 is a block diagram of a computing device according to an embodiment of the present disclosure;
FIG. 2 is a flowchart of a special effect display method according to an embodiment of the present application;
FIG. 3 is a schematic diagram of an effect display method applied to a game scene according to an embodiment of the present disclosure;
FIG. 4 is a schematic illustration of a flame effect prior to adjustment provided by an embodiment of the present disclosure;
FIG. 5 is a schematic illustration of a flame effect after adjustment provided by an embodiment of the present disclosure;
fig. 6 is a schematic structural diagram of a special effect display device according to an embodiment of the present application.
Detailed Description
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present application. This application is capable of implementation in many different ways than those herein set forth and of similar import by those skilled in the art without departing from the spirit of this application and is therefore not limited to the specific implementations disclosed below.
The terminology used in the one or more embodiments of the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the one or more embodiments of the present application. As used in one or more embodiments of the present application and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used in one or more embodiments of the present application refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It will be understood that, although the terms first, second, etc. may be used herein in one or more embodiments of the present application to describe various information, these information should not be limited by these terms. These terms are only used to distinguish one type of information from another. For example, a first aspect may be termed a second aspect, and, similarly, a second aspect may be termed a first aspect, without departing from the scope of one or more embodiments of the present application. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
First, the noun terms to which one or more embodiments of the present application relate are explained.
Target position: a location in the virtual scene for displaying the special effect.
Target distance: which may also be referred to as the line of sight, i.e., the position between the virtual lens in the virtual scene and the focal point of the target object.
Target object: players, characters, objects, etc. in the virtual scene. Such as trees, towers, stones, player images, etc. in the game scene.
Next, an application scenario of one or more embodiments of the present application will be described.
In a game scene, in order to enrich the game effect, various cool special effects are usually used to give visual impact to the user, so that the user can obtain better visual experience. However, the three-dimensional special effect is too small or incompletely displayed due to different distances between the three-dimensional special effect and the virtual lens in a game scene, so that the visual effect of special effect display is influenced, and further the game experience of a user is influenced.
Therefore, the application provides a special effect display method, which can avoid the problem that the displayed special effect is too small or too large, so that the special effect display is more flexible, and the visual effect of the special effect display is further improved. Specific embodiments can be found in the following examples.
In the present application, a special effect display method and apparatus, a computing device, and a computer-readable storage medium are provided, which are described in detail in the following embodiments one by one.
FIG. 1 shows a block diagram of a computing device 100 according to an embodiment of the present application. The computing device may be a terminal. The components of the computing device 100 include, but are not limited to, memory 110 and processor 120. The processor 120 is coupled to the memory 110 via a bus 130 and a database 150 is used to store data.
Computing device 100 also includes access device 140, access device 140 enabling computing device 100 to communicate via one or more networks 160. Examples of such networks include the Public Switched Telephone Network (PSTN), a Local Area Network (LAN), a Wide Area Network (WAN), a Personal Area Network (PAN), or a combination of communication networks such as the internet. Access device 140 may include one or more of any type of network interface (e.g., a Network Interface Card (NIC)) whether wired or wireless, such as an IEEE802.11 Wireless Local Area Network (WLAN) wireless interface, a worldwide interoperability for microwave access (Wi-MAX) interface, an ethernet interface, a Universal Serial Bus (USB) interface, a cellular network interface, a bluetooth interface, a Near Field Communication (NFC) interface, and so forth.
In one embodiment of the present application, the above-mentioned components of the computing device 100 and other components not shown in fig. 1 may also be connected to each other, for example, by a bus. It should be understood that the block diagram of the computing device architecture shown in FIG. 1 is for purposes of example only and is not limiting as to the scope of the present application. Those skilled in the art may add or replace other components as desired.
Computing device 100 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., tablet, personal digital assistant, laptop, notebook, netbook, etc.), a mobile phone (e.g., smartphone), a wearable computing device (e.g., smartwatch, smartglasses, etc.), or other type of mobile device, or a stationary computing device such as a desktop computer or PC. Computing device 100 may also be a mobile or stationary server.
Wherein, the processor 120 may execute the steps in the special effect display method shown in fig. 2. Fig. 2 is a flowchart illustrating an effect display method according to an embodiment of the present application, including steps 202 to 206.
Step 202: and determining the target position for displaying the special effect.
That is, it is first necessary to determine where in the virtual scene the special effect is displayed.
In some embodiments, the specific implementation of determining the target position for displaying the special effect may include: receiving a processing operation for a target object; if the processing operation comprises displaying a special effect, determining the position of the target object; and taking the position of the target object as the target position.
That is, the computing device may receive a processing operation for a target object in the virtual scene, and if the processing operation includes displaying a special effect, it indicates that special effect display needs to be performed at a position where the target object is located, and therefore, it needs to determine a position of the target object in the virtual scene and determine the position of the target object as a target position.
As an example, in a game scene, if the target object is a game player, another game player may attack the game player, and it may be considered that an attack operation of the other game player on the game player is received. The attack operation may include modifying operation data of the game player, and, in order to make the game screen more realistic, an attack effect may be displayed when the game player is attacked, and therefore, the attack operation further includes displaying the effect. The position of the game player in the game scene can be acquired, and the position can be determined as the target position for displaying the special effect.
As another example, in a game scenario, if the target object is a game player, the game player may release game skill by himself, and it may be considered that a processing operation for the game player is received, and the processing operation may include displaying a special effect on the game player, and the position of the game player may be determined as the target position.
As yet another example, if the target object is another item in the game scene, such as a tree, a tower, a house, etc., to which the game player may release various game skills, the game player may consider that a processing operation for the other item is received. For example, a game player may release an attack skill to a tower in a game, may consider that a processing operation to the tower in the game is received, and in order to visually make the user feel the attack, may display an attack effect when the tower is attacked, and thus, the processing operation may include displaying the effect. The position of the tower in the game scene may be obtained and determined as the target position for displaying the special effect.
As an example, after determining that the processing operation including displaying the special effect for the target object is received, it may be considered that the special effect needs to be displayed at the position where the target object is located, and therefore, a three-dimensional coordinate of the target object in the virtual scene may be acquired, and a position corresponding to the three-dimensional coordinate may be determined as a target position where the special effect needs to be displayed.
In other embodiments, a processing operation on the target object is received, and if the processing operation includes a specific position for displaying a special effect, the specific position for displaying the special effect included in the processing operation may be determined as the target position. For example, if a game player of the target object needs to display a flame effect on the left hand of the game player, the position of the left hand of the game player may be determined as the target position.
As an example, the specific position for displaying the special effect included in the processing operation may be a position of the display special effect relative to the target object, that is, a position under a coordinate system of the target object, which needs to be converted into a position relative to the virtual scene, that is, a position under a coordinate system of the target object is converted into a position under a coordinate system of the virtual scene, and the position is determined as a target position for displaying the special effect.
In the embodiment of the application, when a processing operation including displaying a special effect for a target object is received, it may be determined that special effect display is required, and then a position where the target object is located may be determined as a target position. Therefore, the target position needing special effect display can be determined more accurately, and the accuracy of determining the target position is improved.
Step 204: and acquiring a target distance between the virtual lens and the target position in the virtual scene.
As an example, a virtual lens may be considered a virtual viewing camera in a virtual scene, i.e., a virtual viewing camera that views a field of view of a game player.
According to the embodiment of the application, the size of the special effect to be displayed needs to be flexibly adjusted according to the distance between the lens and the special effect to be displayed, so that the target distance between the virtual lens and the special effect to be displayed needs to be determined, and the target distance between the virtual lens and the target position needs to be acquired because the special effect to be displayed is displayed at the target position.
In an implementation, the specific implementation of acquiring the target distance between the virtual lens and the target position in the virtual scene may include: acquiring the lens position of the virtual lens in the virtual scene; determining the target distance based on the lens position and the target position.
As an example, a three-dimensional coordinate of the virtual lens in the virtual scene may be acquired, the three-dimensional coordinate may be determined as a lens position of the virtual lens in the virtual scene, and the target distance may be determined based on the three-dimensional coordinate and a three-dimensional coordinate corresponding to the target position.
For example, assuming that the target position is (120, 120, 110) and the lens position of the virtual lens is (100, 100, 100), it may be determined that the target distance is 30.
In the embodiment of the application, the special effect to be displayed is displayed at the target position of the target object, so that the distance between the virtual lens and the special effect to be displayed can be regarded as the distance between the position of the virtual lens and the target position, the distance between the lens position of the virtual lens and the target position is determined as the target distance, and an adjusting basis is provided for the size adjustment of the subsequent special effect to be displayed.
Step 206: and adjusting the size of the special effect to be displayed based on the target distance to obtain a target special effect, and displaying the target special effect at the target position.
That is, it is necessary to adjust the size of the special effect to be displayed according to the target distance, and display the adjusted target special effect at the target position.
In implementation, the specific implementation of adjusting the size of the to-be-displayed special effect based on the target distance to obtain the target special effect may include: acquiring the corresponding relation between the target distance and the scaling; determining a target scaling of the special effect to be displayed based on the corresponding relation; and adjusting the size of the special effect to be displayed based on the target scaling to obtain the target special effect.
That is, the corresponding relationship between the target distance and the zoom ratio may be preset, so that the target zoom ratio of the special effect to be displayed may be determined according to the target distance, and the special effect to be displayed may be adjusted based on the target zoom ratio, so as to obtain the target special effect.
As an example, the correspondence of the target distance to the scaling ratio may be set in advance. For example, assume that the target distance is 100 meters, the scaling of the special effect to be displayed is 1, the target distance is 10 meters, the scaling of the special effect to be displayed is 0.5, the target distance is 500 meters, the scaling of the special effect to be displayed is 1.5, and so on.
In some embodiments, adjusting the size of the special effect to be displayed based on the target scaling to obtain the specific implementation of the target special effect may include: determining a target size of the special effect to be displayed based on the target scaling and the size of the special effect to be displayed; and taking the special effect to be displayed with the size as the target special effect.
For example, assuming that the to-be-displayed special effect is a cube, and the side length is a, the target scaling is 1.2, the target size of the to-be-displayed special effect may be determined to be 1.2a, and the to-be-displayed special effect with the side length of 1.2a may be determined to be the target special effect.
By the method, special effects to be displayed with different sizes can be displayed according to different target distances. At a far position, the displayed effect is actually larger, at a near position, the displayed effect is actually smaller, but from the visual effect, the seen effect is as large no matter where the position is. The scheme can achieve the effect of fixing the size of the special effect to be displayed visually.
In a possible implementation manner, the specific implementation of displaying the target special effect at the target position may include: and displaying a display window of the target special effect at the target position according to the target size, and displaying the target special effect through the display window.
That is, a display window may be presented on the screen and then the target effect may be displayed in the display window.
As one example, a computing device may draw a 3D animated special effect display window on a virtual scene according to a target size of a target special effect. The drawing of the display window can use a glViewPort function in OpenGL (OpenGraphics Library), where glViewPort is set as a whole pixel rectangle occupying the display window by default, and the size of the display window is the same as that of the set viewport, so that the transformation can be implemented by using the glViewPort function, a pixel rectangle is defined in the display window, and finally the target special effect is mapped into the rectangle, so that the display of the target special effect can be implemented.
In another possible implementation manner, the specific implementation of displaying the target special effect at the target position may include: rendering the target special effect, and displaying the rendered target special effect at the target position.
Further, before the size of the special effect to be displayed is adjusted based on the target distance to obtain the target special effect, the size of the template pixel of the special effect to be displayed can be obtained to obtain the size of the special effect to be displayed.
As an example, the template pixel size of a special effect to be displayed refers to the absolute width and height pixel values of the special effect to be displayed.
In an implementation, the specific implementation of obtaining the size of the template pixel of the special effect to be displayed may include: acquiring the multimedia file with the special effect to be displayed, and acquiring metadata of the special effect to be displayed from the multimedia file; and acquiring the size of the template pixel of the special effect to be displayed from the metadata of the special effect to be displayed.
The Metadata (Metadata), also called intermediary data and relay data, is data (data about data) describing data, and is mainly used for describing information of data attributes. The metadata of the special effect to be displayed may include information such as a format, an occupied memory size, and a size of the special effect to be displayed.
That is to say, a multimedia file of a special effect to be displayed may be obtained, metadata of the special effect to be displayed may be stored in the multimedia file, and the metadata includes size information of the special effect to be displayed, so that a template pixel size of the special effect to be displayed may be obtained from the metadata.
In some embodiments, the processing operation includes an effect identifier of an effect to be displayed, and the specific implementation of obtaining the multimedia file of the effect to be displayed may include: sending a file acquisition request to a server, wherein the file acquisition request comprises a special effect identifier, and receiving a multimedia file with a special effect to be displayed, which corresponds to the special effect identifier acquired by the server based on the file acquisition request.
As an example, a multimedia file with a special effect may be stored in the server in advance, and the multimedia file with a special effect is stored in correspondence with the special effect identifier of the special effect. Therefore, the computing device can send a file obtaining request to the server, the file obtaining request includes the special effect identifier, after the server receives the file obtaining request, the server obtains the multimedia file corresponding to the special effect identifier from the stored multiple multimedia files, and sends the obtained multimedia file to the computing device, so that the computing device can obtain the multimedia file to be displayed with the special effect.
In the embodiment of the application, the multimedia file with the special effect to be displayed can be acquired to the local of the computing equipment by sending the file acquisition request to the server, and the metadata of the special effect to be displayed in the multimedia file can be read, so that the size of the pixel of the template with the special effect to be displayed is obtained.
It should be noted that the sizes of the template pixels of different special effects are different, and the size of the template pixel may be specifically set according to the shape, style, playing mode, and the like of the special effect, which is not limited in this embodiment of the present application.
The special effect display method provided by the embodiment of the application determines the target position for displaying the special effect; acquiring a target distance between a virtual lens and the target position in a virtual scene; and adjusting the size of the special effect to be displayed based on the target distance to obtain a target special effect, and displaying the target special effect at the target position. That is, in the embodiment of the present application, the size of the to-be-displayed special effect may be adjusted, and the to-be-displayed special effect may be adjusted according to the target distance between the virtual lens and the position where the special effect is displayed, and then the target special effects of different sizes may be displayed at the target position, so that the displayed target special effects may have different sizes for different target distances, but due to different target positions, the same effect may be achieved in terms of visual effect, so that the displayed target special effect may not be unclear or may not be completely displayed on the screen, and the special effect display may be performed more flexibly, thereby improving the effect of the special effect display, and further improving the user experience.
Fig. 3 illustrates an effect display method applied to a game scene according to an embodiment of the present application, which is described by taking an application of the effect display method in the game scene as an example, and may include steps 302 to 328.
Step 302: the gamer releases the gameplay skills themselves, which include displaying a flame effect.
In a game scene, if a game player wants to release game skills, a cool special effect can be set for the game skills in order to improve the visual effect of the game. For example, assume that the game player's game skills may show a flame effect.
Step 304: and determining the position of the game player to obtain a target position for displaying the flame special effect.
Step 306, acquiring the lens position of the virtual lens in the game scene.
And 308, determining a target distance between the virtual lens and the flame special effect based on the lens position and the target position.
For example, assuming that the target position is (140, 130, 110) and the lens position of the virtual lens is (100, 100, 100), the target distance may be determined to be 500.
Step 310, sending a file obtaining request to a server, wherein the file obtaining request comprises the identification of the flame special effect.
In step 312, the server obtains a multimedia file corresponding to the identifier of the flame special effect based on the file obtaining request, and sends the multimedia file to the computing device.
For example, a plurality of multimedia files may be pre-stored in the server, and each multimedia file corresponds to one special effect identifier. The server can obtain the multimedia file corresponding to the flame special effect according to the flame special effect identification.
And step 314, receiving the multimedia file fed back by the server to obtain the multimedia file with the flame special effect.
Step 316, obtaining the metadata of the flame special effect from the multimedia file of the flame special effect.
Step 318, obtaining the template pixel size of the flame special effect from the metadata of the flame special effect.
Step 320, obtaining the corresponding relation between the target distance and the scaling.
For example, assume that the target distance is 100 meters, the scaling of the special effect to be displayed is 1, and the target distance is 500 meters, the scaling of the special effect to be displayed is 1.5.
Step 322, determining a target scaling of the flame effect based on the correspondence.
For example, assuming that the target distance is 500 meters in this embodiment, the target scaling is 1.5, i.e., the size of the flame effect needs to be enlarged by 1.5 times.
Based on the target scaling and the size of the flame effect, a target size of the flame effect is determined 324.
Step 326, the flame effect with the size as the target size is taken as the target flame effect.
And 328, displaying a display window of the target flame special effect at the target position according to the target size, and displaying the target flame special effect through the display window.
For example, referring to FIG. 4, FIG. 4 is a schematic illustration of flame effects displayed at different target locations. In fig. 4, 4A is the flame effect displayed at the target distance of 100 meters, and 4B is the flame effect displayed at the target distance of 500 meters, so that it can be seen that, before adjustment is not performed, the flame effects of the template pixel size are displayed at different target positions, but the target distances from the virtual lens are different, so the two flame effects of 4A and 4B are different in visual effect.
Referring to FIG. 5, FIG. 5 is a schematic view of a target flame effect shown after resizing the flame effect. In fig. 5, 5A is a target flame special effect displayed at a target distance of 100 m, and 5B is a target flame special effect displayed at a target distance of 500 m, so that it can be seen that, although the target positions are different, the sizes of the two target flame special effects of 5A and 5B are the same in visual effect due to the adjustment of the sizes of the flame special effects according to the target distances.
In the embodiment of the application, no matter how long the target distance is, the special effect can be clearly displayed on the screen of the computing device, and the problem that the displayed special effect is too small and cannot be clearly seen or too large and cannot be completely displayed is avoided.
The special effect display method provided by the embodiment of the application determines the target position for displaying the special effect; acquiring a target distance between a virtual lens and the target position in a virtual scene; and adjusting the size of the special effect to be displayed based on the target distance to obtain a target special effect, and displaying the target special effect at the target position. That is, in the embodiment of the present application, the size of the to-be-displayed special effect may be adjusted, and the to-be-displayed special effect may be adjusted according to the target distance between the virtual lens and the position where the special effect is displayed, and then the target special effects of different sizes may be displayed at the target position, so that the displayed target special effects may have different sizes for different target distances, but due to different target positions, the same effect may be achieved in terms of visual effect, so that the displayed target special effect may not be unclear or may not be completely displayed on the screen, and the special effect display may be performed more flexibly, thereby improving the effect of the special effect display, and further improving the user experience.
Corresponding to the above method embodiment, the present application further provides an embodiment of a special effect display device, and fig. 6 shows a schematic structural diagram of the special effect display device according to an embodiment of the present application. As shown in fig. 6, the apparatus 600 includes:
a determination module 602 configured to determine a target location for displaying a special effect;
an obtaining module 604 configured to obtain a target distance between a virtual lens in a virtual scene and the target position;
a display module 606 configured to adjust a size of the to-be-displayed special effect based on the target distance to obtain a target special effect, and display the target special effect at the target position.
Optionally, the determining module 602 is configured to:
receiving a processing operation for a target object;
if the processing operation comprises displaying a special effect, determining the position of the target object;
and taking the position of the target object as the target position.
Optionally, the obtaining module 604 is configured to:
acquiring the lens position of the virtual lens in the virtual scene;
determining the target distance based on the lens position and the target position.
Optionally, the display module 606 is further configured to:
and acquiring the size of the template pixel of the special effect to be displayed to obtain the size of the special effect to be displayed.
Optionally, the display module 606 is configured to:
acquiring the multimedia file with the special effect to be displayed, and acquiring metadata of the special effect to be displayed from the multimedia file;
and acquiring the size of the template pixel of the special effect to be displayed from the metadata of the special effect to be displayed.
Optionally, the display module 606 is configured to:
the processing operation comprises a special effect identifier of a special effect to be displayed, and a file acquisition request is sent to a server, wherein the file acquisition request comprises the special effect identifier;
and receiving the multimedia file of the special effect to be displayed corresponding to the special effect identification acquired by the server based on the file acquisition request.
Optionally, the display module 606 is configured to:
acquiring the corresponding relation between the target distance and the scaling;
determining a target scaling of the special effect to be displayed based on the corresponding relation;
and adjusting the size of the special effect to be displayed based on the target scaling to obtain the target special effect.
Optionally, the display module 606 is configured to:
determining a target size of the special effect to be displayed based on the target scaling and the size of the special effect to be displayed;
and taking the special effect to be displayed with the size as the target special effect.
Optionally, the display module 606 is configured to:
and displaying a display window of the target special effect at the target position according to the target size, and displaying the target special effect through the display window.
The special effect display method provided by the embodiment of the application determines the target position for displaying the special effect; acquiring a target distance between a virtual lens and the target position in a virtual scene; and adjusting the size of the special effect to be displayed based on the target distance to obtain a target special effect, and displaying the target special effect at the target position. That is, in the embodiment of the present application, the size of the to-be-displayed special effect may be adjusted, and the to-be-displayed special effect may be adjusted according to the target distance between the virtual lens and the position where the special effect is displayed, and then the target special effects of different sizes may be displayed at the target position, so that the displayed target special effects may have different sizes for different target distances, but due to different target positions, the same effect may be achieved in terms of visual effect, so that the displayed target special effect may not be unclear or may not be completely displayed on the screen, and the special effect display may be performed more flexibly, thereby improving the effect of the special effect display, and further improving the user experience.
The above is a schematic scheme of a special effect display device of this embodiment. It should be noted that the technical solution of the special effect display apparatus belongs to the same concept as the technical solution of the special effect display method described above, and details of the technical solution of the special effect display apparatus, which are not described in detail, can be referred to the description of the technical solution of the special effect display method described above.
An embodiment of the present application further provides a computing device, which includes a memory, a processor, and computer instructions stored in the memory and executable on the processor, wherein the processor implements the steps of the special effect display method when executing the instructions.
The above is an illustrative scheme of a computing device of the present embodiment. It should be noted that the technical solution of the computing device and the technical solution of the special effect display method described above belong to the same concept, and details that are not described in detail in the technical solution of the computing device can be referred to the description of the technical solution of the special effect display method described above.
An embodiment of the present application further provides a computer readable storage medium, which stores computer instructions, and the instructions, when executed by a processor, implement the steps of the special effect display method as described above.
The above is an illustrative scheme of a computer-readable storage medium of the present embodiment. It should be noted that the technical solution of the storage medium belongs to the same concept as the technical solution of the special effect display method described above, and details that are not described in detail in the technical solution of the storage medium can be referred to the description of the technical solution of the special effect display method described above.
The foregoing description of specific embodiments of the present application has been presented. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
The computer instructions comprise computer program code which may be in the form of source code, object code, an executable file or some intermediate form, or the like. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media does not include electrical carrier signals and telecommunications signals as is required by legislation and patent practice.
It should be noted that, for the sake of simplicity, the above-mentioned method embodiments are described as a series of acts or combinations, but those skilled in the art should understand that the present application is not limited by the described order of acts, as some steps may be performed in other orders or simultaneously according to the present application. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required in this application.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
The preferred embodiments of the present application disclosed above are intended only to aid in the explanation of the application. Alternative embodiments are not exhaustive and do not limit the application to the precise embodiments described. Obviously, many modifications and variations are possible in light of the above teaching. The embodiments were chosen and described in order to best explain the principles of the application and its practical applications, to thereby enable others skilled in the art to best understand and utilize the application. The application is limited only by the claims and their full scope and equivalents.

Claims (12)

1. A special effect display method, comprising:
determining a target position for displaying a special effect;
acquiring a target distance between a virtual lens and the target position in a virtual scene;
and adjusting the size of the special effect to be displayed based on the target distance to obtain a target special effect, and displaying the target special effect at the target position.
2. The special effect display method of claim 1, wherein the determining a target location for displaying the special effect comprises:
receiving a processing operation for a target object;
if the processing operation comprises displaying a special effect, determining the position of the target object;
and taking the position of the target object as the target position.
3. The special effect display method according to claim 1 or 2, wherein the acquiring a target distance between a virtual lens in the virtual scene and the target position includes:
acquiring the lens position of the virtual lens in the virtual scene;
determining the target distance based on the lens position and the target position.
4. The special effect display method according to claim 2, wherein before the adjusting the size of the special effect to be displayed based on the target distance to obtain the target special effect, the method comprises:
and acquiring the size of the template pixel of the special effect to be displayed to obtain the size of the special effect to be displayed.
5. The special effect display method of claim 4, wherein the obtaining the template pixel size of the special effect to be displayed comprises:
acquiring the multimedia file with the special effect to be displayed, and acquiring metadata of the special effect to be displayed from the multimedia file;
and acquiring the size of the template pixel of the special effect to be displayed from the metadata of the special effect to be displayed.
6. The special effect display method according to claim 5, wherein the processing operation includes a special effect identifier of a special effect to be displayed, and the obtaining of the multimedia file of the special effect to be displayed includes:
sending a file acquisition request to a server, wherein the file acquisition request comprises the special effect identification;
and receiving the multimedia file of the special effect to be displayed corresponding to the special effect identification acquired by the server based on the file acquisition request.
7. The special effect display method according to any one of claims 1, 2, 5, and 6, wherein the adjusting the size of the special effect to be displayed based on the target distance to obtain the target special effect comprises:
acquiring the corresponding relation between the target distance and the scaling;
determining a target scaling of the special effect to be displayed based on the corresponding relation;
and adjusting the size of the special effect to be displayed based on the target scaling to obtain the target special effect.
8. The special effect display method of claim 7, wherein the adjusting the size of the special effect to be displayed based on the target scaling to obtain the target special effect comprises:
determining a target size of the special effect to be displayed based on the target scaling and the size of the special effect to be displayed;
and taking the special effect to be displayed with the size as the target special effect.
9. The special effect display method of claim 8, wherein said displaying the target special effect at the target position comprises:
and displaying a display window of the target special effect at the target position according to the target size, and displaying the target special effect through the display window.
10. A special effects display apparatus, comprising:
a determination module configured to determine a target location at which to display the special effect;
an acquisition module configured to acquire a target distance between a virtual lens in a virtual scene and the target position;
and the display module is configured to adjust the size of the special effect to be displayed based on the target distance to obtain a target special effect, and display the target special effect at the target position.
11. A computing device comprising a memory, a processor, and computer instructions stored on the memory and executable on the processor, wherein the processor implements the steps of the method of any one of claims 1-9 when executing the instructions.
12. A computer-readable storage medium storing computer instructions, which when executed by a processor, perform the steps of the method of any one of claims 1 to 9.
CN202011603967.0A 2020-12-29 2020-12-29 Special effect display method and device Pending CN112604279A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011603967.0A CN112604279A (en) 2020-12-29 2020-12-29 Special effect display method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011603967.0A CN112604279A (en) 2020-12-29 2020-12-29 Special effect display method and device

Publications (1)

Publication Number Publication Date
CN112604279A true CN112604279A (en) 2021-04-06

Family

ID=75249151

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011603967.0A Pending CN112604279A (en) 2020-12-29 2020-12-29 Special effect display method and device

Country Status (1)

Country Link
CN (1) CN112604279A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113476840A (en) * 2021-07-06 2021-10-08 网易(杭州)网络有限公司 Special effect processing method, device, equipment and storage medium in game
CN114100128A (en) * 2021-12-09 2022-03-01 腾讯科技(深圳)有限公司 Prop special effect display method and device, computer equipment and storage medium
CN113476840B (en) * 2021-07-06 2024-06-04 网易(杭州)网络有限公司 Special effect processing method, device and equipment in game and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060103646A1 (en) * 2004-11-16 2006-05-18 Sony Computer Entertainment Inc. Entertainment apparatus, object display device, object display method, recording medium and character display method
US10026229B1 (en) * 2016-02-09 2018-07-17 A9.Com, Inc. Auxiliary device as augmented reality platform
CN111111173A (en) * 2019-12-03 2020-05-08 网易(杭州)网络有限公司 Information display method, device and storage medium for virtual reality game
US20200394985A1 (en) * 2019-06-14 2020-12-17 Honeywell International Inc. System and method for 3d display of dynamic objects on synthetic vision system in cockpit display system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060103646A1 (en) * 2004-11-16 2006-05-18 Sony Computer Entertainment Inc. Entertainment apparatus, object display device, object display method, recording medium and character display method
US10026229B1 (en) * 2016-02-09 2018-07-17 A9.Com, Inc. Auxiliary device as augmented reality platform
US20200394985A1 (en) * 2019-06-14 2020-12-17 Honeywell International Inc. System and method for 3d display of dynamic objects on synthetic vision system in cockpit display system
CN111111173A (en) * 2019-12-03 2020-05-08 网易(杭州)网络有限公司 Information display method, device and storage medium for virtual reality game

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113476840A (en) * 2021-07-06 2021-10-08 网易(杭州)网络有限公司 Special effect processing method, device, equipment and storage medium in game
CN113476840B (en) * 2021-07-06 2024-06-04 网易(杭州)网络有限公司 Special effect processing method, device and equipment in game and storage medium
CN114100128A (en) * 2021-12-09 2022-03-01 腾讯科技(深圳)有限公司 Prop special effect display method and device, computer equipment and storage medium
CN114100128B (en) * 2021-12-09 2023-07-21 腾讯科技(深圳)有限公司 Prop special effect display method, device, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
WO2022095467A1 (en) Display method and apparatus in augmented reality scene, device, medium and program
EP3882870B1 (en) Method and device for image display, storage medium and electronic device
CN113287118A (en) System and method for face reproduction
CN111127624A (en) Illumination rendering method and device based on AR scene
JP7425196B2 (en) hybrid streaming
CN111787015A (en) Game live broadcast interaction system, data processing method and device
US20230290043A1 (en) Picture generation method and apparatus, device, and medium
WO2023045649A1 (en) Video frame playing method and apparatus, and device, storage medium and program product
CN115601484B (en) Virtual character face driving method and device, terminal equipment and readable storage medium
JP2023504608A (en) Display method, device, device, medium and program in augmented reality scene
CN113965773A (en) Live broadcast display method and device, storage medium and electronic equipment
CN112752085A (en) Naked eye 3D video playing system and method based on human eye tracking
CN114531553B (en) Method, device, electronic equipment and storage medium for generating special effect video
CN113127126B (en) Object display method and device
CN111954003A (en) Panoramic video playing method and device
CN112604279A (en) Special effect display method and device
US20230401806A1 (en) Scene element processing method and apparatus, device, and medium
CN110719415A (en) Video image processing method and device, electronic equipment and computer readable medium
CN108205820B (en) Plane reconstruction method, fusion method, device, equipment and storage medium
CN109529349B (en) Image drawing method and device, computing equipment and storage medium
CN110860084B (en) Virtual picture processing method and device
CN114219888A (en) Method and device for generating dynamic silhouette effect of three-dimensional character and storage medium
CN109829963B (en) Image drawing method and device, computing equipment and storage medium
CN111617470B (en) Interface special effect rendering method and device
CN112037341A (en) Method and device for processing VR panorama interaction function based on Web front end

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: 519000 Room 102, 202, 302 and 402, No. 325, Qiandao Ring Road, Tangjiawan Town, high tech Zone, Zhuhai City, Guangdong Province, Room 102 and 202, No. 327 and Room 302, No. 329

Applicant after: Zhuhai Jinshan Digital Network Technology Co.,Ltd.

Applicant after: Guangzhou Xishanju Network Technology Co.,Ltd.

Address before: 519000 Room 102, 202, 302 and 402, No. 325, Qiandao Ring Road, Tangjiawan Town, high tech Zone, Zhuhai City, Guangdong Province, Room 102 and 202, No. 327 and Room 302, No. 329

Applicant before: ZHUHAI KINGSOFT ONLINE GAME TECHNOLOGY Co.,Ltd.

Applicant before: Guangzhou Xishanju Network Technology Co.,Ltd.

CB02 Change of applicant information