Special effect display method and device, equipment and storage medium
By dynamically adjusting the presentation area of the special effects in the application screen, the area ratio of the application screen is maintained at the same area ratio as the application screen, the problem of special effects not matching after the aspect ratio is adjusted is solved, and the adaptability and effect of the special effects display is ensured.
Patent Information
- Application Number
- CN202311257247.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-26
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2043-09-26
AI Technical Summary
In live or short video applications, special effects props are not matched in the screen after the aspect ratio is adjusted, resulting in the special effects display size being too large or too small, affecting the display effect.
By responding to the size adjustment operation of the application screen, the rendering area of the target special effect in the application screen is dynamically adjusted so that it maintains the same area ratio as the area of the application screen under different display sizes.
The adaptability of special effects display is achieved, the problem of special effects display size mismatch caused by aspect ratio adjustment is avoided, and the effect of special effects display is ensured.
Smart Images

Figure CN119729087A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present disclosure relate to the field of image processing technology, and in particular to a special effects display method, device, equipment and storage medium. Background Art
[0002] With the development of network technology, special effects props are increasingly used in entertainment applications such as live broadcasts and short video interactive entertainment. The special effects props provided can enhance the visual effects of real picture content in interactive entertainment scenes such as live broadcasts and short video scenes. At present, entertainment applications are mostly based on mobile terminals, and most entertainment applications present pictures in vertical screen form. Therefore, special effects props are also considered to adapt to the resolution under the aspect ratio corresponding to the vertical screen in the special effects display.
[0003] However, with the continuous iteration of the capabilities of application software, screens with resolutions of other aspect ratios (such as equal aspect ratio or horizontal aspect ratio) will also appear in applications such as live broadcasts or short videos. If the original special effects adapted to the vertical screen are directly migrated and displayed on the screen with the adjusted aspect ratio, there will be a problem that the displayed special effects do not match the screen with the adjusted aspect ratio, such as the display size of the presented special effects being too large or too small, which will affect the display effect of the special effects. Summary of the invention
[0004] The present disclosure provides a special effect display method, device, equipment and storage medium, which realizes the adaptation of the display size of the presented special effect to application screens of various different display sizes, thereby ensuring the special effect display effect.
[0005] In a first aspect, an embodiment of the present disclosure provides a special effect display method, the method comprising:
[0006] In response to a triggering operation of a target special effect, displaying the target special effect in an application screen having a first display size, wherein a first presentation area of the target special effect in the application screen is determined based on the first display size;
[0007] In response to a resizing operation on the application screen, displaying the application screen according to a second display size corresponding to the resizing operation, and determining a second presentation area of the target special effect in the application screen based on the second display size;
[0008] Among them, the first presentation area ratio is the same as the second presentation area ratio, the first presentation area ratio is the ratio of the area of the first presentation area to the screen area of the application screen under the first display size; the second presentation area ratio is the ratio of the area of the second presentation area to the screen area of the application screen under the second display size.
[0009] In a second aspect, the embodiments of the present disclosure further provide a special effects display device, the device comprising:
[0010] A first response module, configured to respond to a triggering operation of a target special effect and display the target special effect in an application screen having a first display size, wherein a first presentation area of the target special effect in the application screen is determined based on the first display size;
[0011] A second response module, configured to respond to a size adjustment operation on the application screen and display the application screen according to a second display size corresponding to the size adjustment operation, wherein a second presentation area of the target special effect in the application screen is determined based on the second display size;
[0012] Among them, the first presentation area ratio is the same as the second presentation area ratio, the first presentation area ratio is the ratio of the area of the first presentation area to the screen area of the application screen under the first display size; the second presentation area ratio is the ratio of the area of the second presentation area to the screen area of the application screen under the second display size.
[0013] In a third aspect, an embodiment of the present disclosure further provides an electronic device, the electronic device comprising:
[0014] one or more processors;
[0015] a storage device for storing one or more programs,
[0016] When the one or more programs are executed by the one or more processors, the one or more processors implement the special effects display method provided in the first aspect of the embodiment of the present disclosure.
[0017] In a fourth aspect, the embodiments of the present disclosure further provide a storage medium comprising computer executable instructions, which, when executed by a computer processor, are used to implement the special effects display method provided in the first aspect of the embodiments of the present disclosure.
[0018] The embodiments of the present disclosure provide a special effect display method, apparatus, device and storage medium, the method comprising: in response to a trigger operation of a target special effect, displaying the target special effect in an application screen having a first display size, wherein a first presentation area of the target special effect in the application screen is determined based on the first display size; in response to a size adjustment operation of the application screen, displaying the application screen according to a second display size corresponding to the size adjustment operation, wherein a second presentation area of the target special effect in the application screen is determined based on the second display size; wherein the first presentation area ratio is the same as the second presentation area ratio, the first presentation area ratio being the ratio of an area of the first presentation area to an area of the application screen at the first display size; and the second presentation area ratio being the ratio of an area of the second presentation area to an area of the application screen at the second display size. In the above technical scheme, when the display size of the application screen is adjusted, the presentation area of the target special effect in the application screen will be adjusted accordingly, and the presentation area of the target special effect in the application screen is determined based on the display size of the application screen; when adjusting the presentation area of the target special effect in the application screen, it is necessary to maintain the area ratio of the presentation area of the special effect in the application screen to the screen area of the application screen unchanged, thereby achieving the adaptation of the display size of the presented special effect to application screens of various different display sizes, avoiding the situation in the prior art where the display size of the presented special effect is too large or too small, and ensuring the special effect display effect. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale.
[0020] Figure 1 A schematic diagram for the definition of field of view angle;
[0021] Figure 2 This is an example diagram of special effect display under different screen display sizes processed based on the X-axis alignment strategy in the prior art;
[0022] Figure 3 This is an example diagram of special effect display under different screen display sizes processed based on the Y-axis alignment strategy in the prior art;
[0023] Figure 4 A flowchart of a special effects display method provided by an embodiment of the present disclosure;
[0024] Figure 5 An example diagram of a special effect visible area in the execution of a special effect display method provided in an embodiment of the present disclosure;
[0025] Figure 6 An example diagram of a special effect presentation area in the execution of a special effect display method provided in an embodiment of the present disclosure;
[0026] Figure 7 A structural schematic diagram of a special effect display device provided by an embodiment of the present disclosure;
[0027] Figure 8 A schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION
[0028] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.
[0029] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.
[0030] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.
[0031] It should be noted that the concepts such as "first" and "target" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0032] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0033] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0034] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, scope of use, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.
[0035] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can autonomously choose whether to provide personal information to software or hardware such as an electronic device, application, server, or storage medium that performs the operation of the technical solution of the present disclosure according to the prompt message.
[0036] As an optional but non-limiting implementation, in response to receiving an active request from the user, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.
[0037] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that meet the relevant laws and regulations may also be applied to the implementation of the present disclosure.
[0038] With the development of network technology, special effects props are increasingly used in entertainment application software such as live broadcast, short video interactive entertainment, etc. The special effects props provided can enhance the visual effects of real picture content in interactive entertainment scenes such as live broadcast scenes and short video scenes. For example, special effects props have two-dimensional maps and three-dimensional models. At present, entertainment application software mostly uses mobile terminals as carriers, and entertainment application software mostly presents pictures in the form of vertical screens. Therefore, special effects props also consider adapting to the resolution corresponding to the aspect ratio of the vertical screen in the special effects display. For example, for mobile terminal phones, vertical screen shooting is usually used, and most of its special effects are only suitable for vertical screen pictures with an aspect ratio of 9:16.
[0039] However, with the continuous iteration of the capabilities of application software, other aspect ratios (such as equal aspect ratio or horizontal aspect ratio) will also appear in applications such as live broadcasts or short videos. For example, other aspect ratio resolutions include equal aspect ratio 1:1, horizontal aspect ratio 16:9, etc. For example, in an application scenario, a playback window occupies the entire screen for vertical screen playback. When several playback windows need to be displayed on the entire screen at the same time, the screen will present each playback window in the form of a nine-square grid, and the screen of each playback window will be displayed with an aspect ratio of 1:1. Or it is necessary to change the resolution display screen of the vertical screen aspect ratio to the resolution display screen of the horizontal screen aspect ratio. If the original special effects adapted to the vertical screen are directly migrated and displayed in the screen after the aspect ratio is adjusted, there will be a problem that the displayed special effects do not match the screen after the aspect ratio is adjusted, such as the display size of the presented special effects is too large or too small, thereby affecting the special effects display effect.
[0040] It is important to know that if you want to present 3D special effects on the screen, you need to project the 3D special effects to present the projected image on the screen. For 3D special effects, it is equivalent to using a virtual camera to project the 3D special effects, and then generate a special effects projection plane. In 3D special effects rendering, the concept of field of view (FOV) is introduced. The field of view includes horizontal and vertical field of view. FOV can be used to intercept the special effects visible area on the special effects projection plane, and the special effects content in the intercepted special effects visible area can be rendered and presented. Figure 1 A schematic diagram of the definition of the field of view angle, such as Figure 1 As shown, a visual cone is formed based on the field of view of the visual point, and the height and width of the visible area formed by the visual cone on the projection plane constitute the horizontal field angle and the vertical field angle with the visual point. The visible area 11 is determined based on the height and width.
[0041] In traditional game scenes, the field of view generally remains unchanged. For example, an initial field of view can be set so that the visual image rendered after the three-dimensional model is projected matches the device screen interface. However, in some application scenarios, such as live broadcast scenes, there may be a need to dynamically adjust the width and height of the screen. In this case, if the aspect ratio of the screen is adjusted, the aspect ratio of the FOV may be different from that of the actual screen, so a method is needed to solve the problem that when the display size of the picture changes, the display size projected by the special effects can adapt to the changed picture. The prior art usually adopts the strategy of aligning the X-axis or aligning the Y-axis.
[0042] For example, when presenting a 3D special effect suitable for a vertical screen aspect ratio on a screen with a new aspect ratio, choose to align on the X axis, that is, keep the horizontal field of view unchanged, and determine the new vertical field of view corresponding to the screen with the new aspect ratio. After determining the new vertical field of view, the 3D special effect can be intercepted on the X and Y axes based on the horizontal and vertical field of view angles to obtain a visible area, but there will be a problem that the displayed special effect does not match the screen after the aspect ratio is adjusted. For example, Figure 2 This is an example diagram of special effects display under different screen display sizes processed based on the X-axis alignment strategy in the prior art, such as Figure 2 As shown, when aligned based on the X-axis, when the display size changes from a vertical screen to a screen with the same aspect ratio and then to a horizontal screen, the width remains consistent, and the Y-axis FOV = height*FOV-X / width, where width and height represent the width and height of the adjusted screen, and X represents the width under the original field of view. Based on the visible area determined by this strategy, the special effects will be enlarged relative to the screen, resulting in the mismatch between the displayed special effects and the screen after the aspect ratio is adjusted.
[0043] Similarly, if you choose to align by the Y axis, that is, the vertical field of view remains unchanged, determine the new horizontal field of view corresponding to the new aspect ratio. After determining the new horizontal field of view, you can intercept the 3D special effects on the X and Y axes based on the horizontal and vertical field of view to obtain a visible area. There will also be a problem that the displayed special effects do not match the picture after the aspect ratio is adjusted. For example, Figure 3 This is an example diagram of special effects display under different screen display sizes processed based on the Y-axis alignment strategy in the prior art, such as Figure 3 As shown, when aligned based on the Y axis, when changing from a vertical screen to a screen with the same aspect ratio and then to a horizontal screen, the height remains consistent, the X-axis FOV = width*FOV-Y / height, width and height represent the width and height of the adjusted screen, and Y represents the height under the original field of view. In this case, the special effects will be smaller than the screen, resulting in a mismatch between the displayed special effects and the screen after the aspect ratio is adjusted.
[0044] Based on this, this embodiment provides a special effect display method, which can adapt the special effect display to changes in screen size.
[0045] Figure 4 A flow chart of a special effects display method provided in an embodiment of the present disclosure is applicable to the situation where special effects are displayed when the screen display size changes. The method can be executed by a special effects display device, which can be implemented in the form of software and / or hardware. Optionally, it can be implemented by an electronic device as an execution terminal, which can be a mobile terminal, a PC or a server, etc.
[0046] like Figure 4 As shown, a special effect display method provided by an embodiment of the present disclosure specifically includes the following operations:
[0047] S110. In response to a triggering operation of a target special effect, display the target special effect in an application screen having a first display size, wherein a first presentation area of the target special effect in the application screen is determined based on the first display size.
[0048] It should be noted that one of the application scenarios of the special effects display method provided in this embodiment can be described as follows: the special effects display method provided in this embodiment can be used as a plug-in in an application software with special effects application and display functions, and is used to implement the application of special effects to a target object, and the display of the target object after the special effects are applied. When a user wants to apply a special effect to a target object, the special effect that he wants to apply and display can be triggered. In this embodiment, the special effect selected to be displayed is recorded as the target special effect. In this embodiment, there is no specific restriction on the target special effect. The target special effect can be a two-dimensional special effect or a three-dimensional special effect. For example, the target special effect can be a two-dimensional sticker, or a three-dimensional wearable hat special effect, a scarf special effect, etc.
[0049] In this embodiment, it can be considered that before the target special effect is applied, the corresponding picture will be displayed on the visualization interface, and the picture to which the target special effect is to be applied will be recorded as the application picture. The application picture is displayed at the current size, and the size of the application picture is recorded as the first display size. In this embodiment, there is no specific restriction on the application picture. For example, it can be a picture collected in real time by the camera of a mobile terminal during live broadcast. When the target special effect is triggered, this step will respond to the triggering operation of the target special effect, so that the target special effect will be displayed in the application picture. When the target special effect is displayed in the application picture, it will occupy a certain area for presentation. In this embodiment, the presentation area of the target special effect in the application picture is recorded as the first presentation area.
[0050] It is important to know that the size of the area where the target special effect is displayed in the application screen is related to the display size of the application screen to which the target special effect is applied, which is equivalent to the first presentation area of the target special effect in the application screen being associated with the first display size of the application screen. The goal of this setting is to ensure that the presentation size of the target special effect is adapted to the display size of the application screen to ensure a better special effect presentation effect.
[0051] The display size can be understood as resolution. For example, assuming that the mobile phone usually presents the application screen in a vertical screen resolution with an aspect ratio of 9:16, the application screen can be considered as the application screen of the first display size. When the target special effect is triggered, the target special effect will be presented in an area adapted to the aspect ratio of 9:16. Correspondingly, if the application screen is presented at a resolution of an equal aspect ratio of 1:1, the first presentation area suitable for the display size will be determined based on the application screen, and the target special effect will be presented in the first presentation area. For another example, if the application screen is presented at a horizontal screen resolution with an aspect ratio of 16:9, the first presentation area suitable for the display size will be determined based on the application screen, and the target special effect will be presented in the first presentation area.
[0052] S120. In response to a resizing operation on the application screen, display the application screen in a second display size corresponding to the resizing operation, and determine a second presentation area of the target special effect in the application screen based on the second display size.
[0053] Among them, the first presentation area ratio is the same as the second presentation area ratio, the first presentation area ratio is the ratio of the area of the first presentation area to the screen area of the application screen under the first display size; the second presentation area ratio is the ratio of the area of the second presentation area to the screen area of the application screen under the second display size.
[0054] It should be noted that the special effects display method provided in this embodiment can adapt to changes in the display size of the application screen to adjust the presentation area of the target special effect, so that the presentation area of the target special effect is adapted to the display size of the application screen, avoiding the target special effect from being too large or too small in the application screen.
[0055] In this embodiment, the application screen can be resized. The resizing operation of the application screen can be an operation in which the user adjusts the size of the application screen by dragging and sliding according to his own needs, or it can be an operation in which the application screen size is automatically adjusted when a certain adjustment operation is received. For example, in a certain application scenario, when a user broadcasts live through a mobile phone, if the live broadcast scene is a user broadcasting live, there is a corresponding playback window that fills the entire screen for vertical screen playback. When the user performs a microphone connection operation, several other users will be invited to participate, and the camera screen of the corresponding invited user will also be displayed on the screen. In this way, a playback window that fills the entire screen will be adjusted so that the playback window corresponding to each user will also be displayed on the screen. Each playback window will be presented in the form of a nine-square grid on the screen, and the screen of each playback window will be displayed with a resolution of 1:1 in aspect ratio. It can be considered that the window initially displayed in vertical screen resolution will be adjusted to a window with an aspect ratio of 1:1. The triggering operation of inviting other users in this process can be considered as the resizing operation of the application screen.
[0056] When the resizing operation on the application screen is triggered, this step is used to respond to the resizing operation on the screen and adjust the display size of the application screen accordingly. After receiving the resizing operation on the application screen, this execution subject analyzes what the resizing operation is and what size the application screen needs to be adjusted to. In this embodiment, the size that the application screen should display after the resizing operation is performed on the application screen is recorded as the second display size, and the second display size is different from the first display size. This step will display the application screen according to the second display size corresponding to the resizing operation.
[0057] It should be noted that when the application screen is displayed in the second display size, the size of the presentation area of the target special effect in the application screen needs to be adjusted accordingly to ensure that the presentation size of the target special effect is adapted to the application screen after the display size is adjusted. In this embodiment, the area where the target special effect is presented in the application screen displayed in the second display size is recorded as the second presentation area. The second presentation area is determined based on the second display size.
[0058] In this embodiment, the ratio of the area of the first presentation area to the screen area of the application screen at the first display size is recorded as the first presentation area ratio. The ratio of the area of the second presentation area to the screen area of the application screen at the second display size is recorded as the second presentation area ratio. In order to ensure that the special effects are adapted to multiple resolutions, that is, the area of the special effects presented in the application screens of different display sizes is adapted thereto, it is necessary to ensure that the first presentation area ratio is the same as the second presentation area ratio.
[0059] In this embodiment, the target special effect may be a two-dimensional special effect or a three-dimensional special effect. In the case where the target special effect is a two-dimensional special effect, as a specific implementation method, the display area of the target special effect in the application screen before and after the adjustment may be adjusted based on the size ratio of the display size before and after the adjustment of the application screen.
[0060] In the case where the target special effect is a three-dimensional special effect, the adjustment size of the target special effect in the application screen is also determined based on the display size of the adjusted application screen. In order to present the three-dimensional special effect on the application screen, it is necessary to project the three-dimensional special effect first, and present the projected screen in the application screen. As a specific implementation method, it can be: first perform a two-dimensional projection conversion on the target special effect to obtain a projection plane corresponding to the target special effect. Different from the prior art in which the special effect visible area is determined by aligning the X-axis or the Y-axis, in this embodiment, after the display size of the application screen is adjusted, the area of the special effect visible area remains unchanged. Based on this, a formula that characterizes the relationship before and after the field of view angle adjustment can be preset, so as to determine the field of view angle corresponding to the adjustment according to the adjusted screen display size. When the field of view angle is known, the special effect visible area can be cut out from the special effect projection plane. Considering that the area ratio of the presentation area of the special effects in the application screen to the screen area of the application screen should be maintained unchanged, that is, the area ratio of the special effects presentation area to the application screen after the application screen size is adjusted is the same as the area ratio before the display size is adjusted, based on this, the special effects visible area is adjusted to a size that is suitable for the adjusted application screen display size, and then the special effects screen information of the adjusted area is rendered to the position where the target special effects should be displayed, so as to obtain the special effects presentation area. It can be seen that based on the above method, multi-resolution adaptation of special effects can be achieved at a low cost without increasing additional performance loss.
[0061] An embodiment of the present disclosure provides a special effect display method, the method comprising: in response to a trigger operation of a target special effect, displaying the target special effect in an application screen having a first display size, wherein a first presentation area of the target special effect in the application screen is determined based on the first display size; in response to a size adjustment operation of the application screen, displaying the application screen according to a second display size corresponding to the size adjustment operation, wherein a second presentation area of the target special effect in the application screen is determined based on the second display size; wherein the first presentation area ratio is the same as the second presentation area ratio, the first presentation area ratio being the ratio of an area of the first presentation area to an area of the application screen at the first display size; and the second presentation area ratio being the ratio of an area of the second presentation area to an area of the application screen at the second display size. In the above technical scheme, when the display size of the application screen is adjusted, the presentation area of the target special effect in the application screen will be adjusted accordingly, and the presentation area of the target special effect in the application screen is determined based on the display size of the application screen; when adjusting the presentation area of the target special effect in the application screen, it is necessary to maintain the area ratio of the presentation area of the special effect in the application screen to the screen area of the application screen unchanged, thereby achieving the adaptation of the display size of the presented special effect to application screens of various different display sizes, avoiding the situation in the prior art where the display size of the presented special effect is too large or too small, and ensuring the special effect display effect.
[0062] The target special effect may be a two-dimensional special effect or a three-dimensional special effect. The following optional embodiment describes the case where the target special effect is a three-dimensional special effect. As a first optional embodiment of this embodiment, based on the above embodiment, the first display size and the second display size are recorded as the screen display size, and the first presentation area and the second presentation area are recorded as the special effect presentation area. The step of determining the special effect presentation area based on the screen display size can be concretized as follows:
[0063] a1) If the target special effect is a three-dimensional special effect, determine the special effect projection plane corresponding to the target special effect.
[0064] In this embodiment, if the target special effect is a 3D special effect, in order to present the 3D special effect on the application screen, the 3D special effect needs to be projected first. Specifically, the projection plane corresponding to the target special effect needs to be determined first, which is recorded as the special effect projection plane corresponding to the target special effect.
[0065] It is understandable that the three-dimensional special effects are obtained by rendering on the three-dimensional model, that is, each three-dimensional special effect corresponds to a three-dimensional model. When the three-dimensional special effect is projected onto a two-dimensional plane, it is equivalent to projecting the three-dimensional model corresponding to the three-dimensional special effect onto the two-dimensional plane, and the two-dimensional plane containing the target special effect after projection is used as the special effect projection plane of the target special effect. Exemplarily, the implementation of projecting the three-dimensional model onto the two-dimensional plane can be determined based on coordinate transformation.
[0066] b1) determining a special effect visible area of the target special effect in the special effect projection plane according to the picture display size.
[0067] Different from the prior art in which the special effect visible area is determined by aligning the X-axis or the Y-axis, in this embodiment, the area of the special effect visible area remains unchanged after the display size of the application screen is adjusted. Based on this, a formula that characterizes the relationship before and after the field of view adjustment can be preset.
[0068] Continuing with the above description, after obtaining the screen display size, the adjusted field of view angle can be determined by substituting the original field of view angle, the aspect ratio of the original display size, and the aspect ratio of the adjusted screen display size into the formula representing the relationship before and after the field of view angle adjustment. Further, based on the adjusted field of view angle, the special effect visible area can be intercepted from the special effect projection plane.
[0069] c1) determining a special effect presentation area of the target special effect in the application screen according to the special effect visible area.
[0070] In order to ensure that the target special effect is presented in the application screen at an appropriate size, that is, to ensure that the special effect presentation area adapts to the application screen after the size is adjusted, the ratio of the presentation area of the corresponding special effect presentation area after the original display size and the screen area of the application screen on which it depends should be the same as the ratio of the presentation area of the corresponding special effect presentation area under the adjusted screen display size and the screen area of the application screen under the screen display size. Based on the area ratio before and after the display size is adjusted, and the area of the application screen after the adjustment, the area of the special effect presentation area after the display size is adjusted can be determined. Adjusting the special effect visible area according to the area is equivalent to adjusting the special effect visible area to a size that is compatible with the adjusted application screen display size. It is further possible to determine the position where the target special effect should be displayed, and render the special effect screen information based on the adjusted area to that position, thereby determining the special effect presentation area of the target special effect in the application screen.
[0071] The above technical solution specifies how to determine the special effect presentation area based on the screen display size if the target special effect is a three-dimensional special effect. If the target special effect is a three-dimensional special effect, the target special effect is first projected to obtain a special effect projection plane; then, according to the screen display size, the special effect visible area is determined in the special effect projection plane, and finally, the special effect presentation area of the target special effect in the application screen is determined according to the special effect visible area. When the display size of the application screen is adjusted, the area of the special effect visible area is guaranteed to remain unchanged, ensuring that the display size of the target special effect presentation is suitable for application screens of various display sizes, and ensuring the special effect display effect.
[0072] As a specific implementation method, the determination of the special effect projection plane corresponding to the target special effect may be concretized as follows:
[0073] a11) Obtaining a target special effect three-dimensional model corresponding to the target special effect.
[0074] In this embodiment, each target special effect is rendered by an underlying special effect 3D model, and in this embodiment, the special effect 3D model corresponding to the target special effect is recorded as the target special effect 3D model. For example, if the target special effect is a hat special effect, then the corresponding target special effect 3D model is the 3D model of the hat; if the target special effect is a scarf special effect, then the corresponding target special effect 3D model is the 3D model of the scarf.
[0075] It should be clear that if the target special effect is a three-dimensional special effect, in order to present the three-dimensional special effect on the application screen, the three-dimensional special effect needs to be projected first. Projecting the target special effect three-dimensional model into the application screen is equivalent to projecting the target special effect three-dimensional model corresponding to the target special effect.
[0076] Specifically, a target special effect three-dimensional model corresponding to the target special effect is obtained, the target special effect three-dimensional model is composed of countless points. Exemplarily, the outer contour of the target special effect three-dimensional model can be represented by the coordinates of several vertices.
[0077] a12) According to the set projection conversion information, the target special effect three-dimensional model is projected into a two-dimensional plane.
[0078] The set projection conversion information can be specifically understood as projection conversion information representing the projection of the three-dimensional model onto the two-dimensional plane. It can be considered that the target special effect three-dimensional model is projected onto the two-dimensional plane according to the projection conversion information. Exemplarily, the target special effect three-dimensional model is projected onto the two-dimensional plane by performing coordinate conversion on the three-dimensional coordinates of the special effect three-dimensional model to obtain a two-dimensional plane represented by the two-dimensional coordinates.
[0079] a13) determining the two-dimensional plane containing the target special effect after projection as the special effect projection plane of the target special effect.
[0080] In this embodiment, after the target special effect three-dimensional model is projected onto a two-dimensional plane, the two-dimensional plane containing the target special effect can be used as the special effect projection plane of the target special effect.
[0081] The above technical solution concretizes the steps of determining the special effects projection plane corresponding to the target special effect. The special effects projection plane of the target special effect is obtained by projecting the target special effect three-dimensional model corresponding to the target special effect onto a two-dimensional plane, thereby realizing the determination of the special effects projection plane of the target special effect, and providing a basis for the subsequent determination of the special effects presentation area.
[0082] As a specific implementation manner, determining the special effect visible area of the target special effect in the special effect projection plane according to the screen display size can be concretized into the following steps:
[0083] b11) Acquire the original viewing angle pre-set relative to the target special effect and the original display size of the application screen on which the special effect presentation depends.
[0084] In this embodiment, a corresponding field of view angle is usually set for application screens of commonly used display sizes. The set field of view angle is suitable for application screens of commonly used display sizes and can have a better special effect display effect. For example, for mobile phone terminals, vertical screen shooting is usually used, and most of its special effects are only applicable to vertical screen pictures with an aspect ratio of 9:16. The reason why it can be applicable to vertical screen pictures with an aspect ratio of 9:16 is that a field of view angle suitable for the display size is set.
[0085] In this embodiment, the initial display size of the application screen is recorded as the original display size, and the field of view corresponding to the target special effect applicable to the application screen of the original display size is recorded as the original field of view. This step is used to obtain the original field of view pre-set relative to the target special effect and the original display size of the application screen on which the special effect presentation depends.
[0086] b12) determining a target field of view angle corresponding to the image display size according to the original field of view angle and the original display size in combination with a given field of view angle-display size relationship.
[0087] In this embodiment, in order to ensure that the target special effect is applicable to application screens of various display sizes when it is presented, it is necessary to ensure that the area of the special effect visible area captured at a certain distance remains unchanged, that is, the area of the special effect visible area captured at different viewing angles remains unchanged. Based on this, the following formula can be used to calculate the target viewing angle.
[0088] The field of view includes the horizontal field of view and the vertical field of view. The horizontal field of view can be expressed as the X-axis FOV, and the vertical field of view can be expressed as the Y-axis FOV. The field of view display size relationship can be expressed as:
[0089]
[0090] X-axis FOV, β represents the original Y-axis FOV, θ' represents the target X-axis FOV, β' represents the target Y-axis
[0091] By substituting the ratio of the width to the height of the adjusted screen display size into the above formula, the target field of view angle can be obtained.
[0092] b13) intercepting the special effect visible area of the target special effect in the special effect projection plane according to the target field of view angle.
[0093] In this embodiment, after the target field of view angle, that is, the X-axis FOV and the Y-axis FOV, is determined, the special effect visible area of the target special effect can be cut out based on the special effect projection plane. Figure 1 , under the premise of knowing the target field of view angle, the width and height of the special effect visible area can be determined, and the special effect visible area can be cut out based on the width and height.
[0094] The above technical solution concretizes the steps of determining the special effect visible area of the target special effect in the special effect projection plane according to the screen display size. By substituting the original field of view angle, the aspect ratio of the original display size and the aspect ratio of the adjusted screen display size into the field of view angle display size relationship formula, the target field of view angle can be determined, and the target field of view angle is adjusted accordingly when the screen display size is adjusted, ensuring that the special effect visible area adapts to the adjusted screen display size and has a higher special effect display effect.
[0095] Preferably, the area of a first region of the special effect visible area intercepted by the target field of view angle in the special effect projection plane is the same as the area of a second region of the special effect visible area intercepted by the special effect projection plane at the original field of view angle.
[0096] In this embodiment, the area of the special effect visible area intercepted by the target field of view angle in the special effect projection plane is recorded as the first area, and the area of the special effect visible area intercepted by the original field of view angle in the special effect projection plane is recorded as the second area. In this embodiment, in order to ensure that the target special effect is applicable to application screens of various display sizes when presented, it is necessary to ensure that the area of the special effect visible area intercepted at a certain distance remains unchanged. That is, the first area of the special effect visible area intercepted by the target field of view angle in the special effect projection plane is the same as the second area of the special effect visible area intercepted by the original field of view angle in the special effect projection plane.
[0097] For example, Figure 5 An example diagram of a special effect visible area in the execution of a special effect display method provided in an embodiment of the present disclosure, such as Figure 5As shown, assuming that the special effect visible area intercepted in the special effect projection plane under the original field of view angle is 21, and the special effect visible area intercepted in the special effect projection plane under the target field of view angle is 22, in this embodiment, it is necessary to ensure that the area of the special effect visible area 21 is the same as the area of the special effect visible area 22.
[0098] The above technical solution limits the area of the special effect visible area intercepted in the special effect projection plane under different field of view angles to remain unchanged, ensuring that the target special effect is suitable for application screens of various display sizes when presented, thereby ensuring the special effect display effect.
[0099] As a specific implementation method, determining the special effect presentation area of the target special effect in the application screen according to the special effect visible area can be concretized into the following steps:
[0100] c11) determining an original screen area of the application screen at the original display size and an original presentation area of the corresponding original special effect presentation area at the original display size, and determining an application screen area of the application screen at the screen display size.
[0101] In this embodiment, the screen display size is equivalent to the original display size. The original display size refers to the display size of the application screen on which the special effect presentation depends corresponding to the original field of view. The screen display size refers to the size of the application screen after the display size is adjusted. When the original display size of the application screen is known, the screen area of the application screen on which the special effect presentation depends can be calculated under the original display size. In this embodiment, the special effect presentation area corresponding to the original display size can be obtained, which is recorded as the original special effect presentation area. When the original special effect presentation area is known, the area of the original special effect presentation area can be determined, which is recorded as the original presentation area. When the screen display size of the application screen is known, the screen area of the application screen can be calculated based on the screen display size, which is recorded as the application screen area.
[0102] c12) determining the area of the to-be-displayed region according to the area ratio of the original presentation area to the original screen area and the application screen area.
[0103] In order to ensure that the special effects presentation area adapts to the resized application screen, the area of the special effects presentation area and the application screen after the display size of the application screen is adjusted should be the same as the area ratio of the original presentation area to the original screen area. Therefore, when the original presentation area and the original screen area are known, the area ratio of the original special effects presentation area and the application screen at the original display size can be determined. The area ratio before and after the adjustment of the screen display size of the application screen should remain unchanged. In this way, after the area ratio and the area of the application screen after the display size is adjusted are known, the two can be multiplied to obtain the area of the special effects presentation area after the screen display size of the application screen is adjusted, which is recorded as the area of the area to be displayed.
[0104] c13) adjusting the special effect visible area according to the area of the to-be-displayed area to obtain the special effect to-be-displayed area.
[0105] After obtaining the area of the area to be displayed and the special effect visible area, the special effect visible area needs to be adjusted according to the area of the area to be displayed so that the area of the special effect visible area is the same as the area of the area to be displayed, and the adjusted area is recorded as the special effect to be displayed area. Exemplarily, the special effect visible area can be enlarged or reduced in equal proportion to obtain an area with the same area as the area to be displayed as the special effect to be displayed area.
[0106] c14) extracting special effect picture information from the special effect to-be-displayed area, and rendering the special effect picture information to the special effect to-be-displayed position in the application screen, to form a special effect presentation area for the target special effect in the application screen.
[0107] The position where the special effect is to be displayed is determined according to the association relationship between the main object included in the application screen and the target special effect.
[0108] Among them, the special effect screen information can be understood as the rendering-related information in the special effect to be displayed area, such as the pixel value in the special effect to be displayed area, the position relationship between the pixel points, etc. The position where the special effect is to be displayed is determined according to the association relationship between the main object and the target special effect contained in the application screen. For example, assuming that the main object is a person, the target special effect is a scarf special effect, and the scarf special effect should be worn on the neck of the person, then the position where the scarf special effect should be worn on the neck of the person can be recorded as the position where the special effect is to be displayed.
[0109] Specifically, the special effect picture information in the special effect to-be-displayed area is extracted, and the special effect picture information is rendered to the special effect to-be-displayed position in the application screen, thereby forming a special effect presentation area of the target special effect in the application screen.
[0110] For example, Figure 6 An example diagram of a special effect presentation area in the execution of a special effect display method provided in an embodiment of the present disclosure, such as Figure 6As shown, it is assumed that the application screen is 31 at the original display size, the original special effect presentation area 311 corresponding to the original display size, the application screen is 32 at the adjusted screen display size, and the special effect presentation area 322 corresponding to the adjusted screen display size. To obtain the special effect presentation area, it is necessary to first determine the area of the area to be displayed based on the ratio of the original presentation area of the original presentation area 311 to the original screen area of the application screen 31 at the original display size and the ratio of the special effect presentation area of the special effect presentation area 322 to the application screen area of the application screen 32 at the screen display size. Then Figure 5 The special effect visible area 22 is adjusted to the size of the area to be displayed, thereby obtaining the special effect to be displayed area, extracting the special effect picture information in the special effect to be displayed area, and rendering the special effect picture information to the special effect to be displayed position in the application screen, forming the special effect presentation area 322 of the target special effect in the application screen.
[0111] It can be seen that according to the method provided in this embodiment, the special effect presentation area of the target special effect can be ensured to be adapted to the application screen after the display size is adjusted, avoiding the situation in the prior art where the display size of the special effect presented is too large or too small, thereby ensuring the special effect display effect.
[0112] The above technical solution specifies the steps of determining the special effect presentation area of the target special effect in the application screen according to the special effect visible area. Based on the ratio of the presentation area of the special effect before and after the display size adjustment to the area of the application screen, it can be determined how large the special effect presentation area should be after the display size adjustment, and then the size of the special effect visible area is adjusted according to the size of the area, and further corresponding rendering is performed. This makes it possible to apply the target special effect to application screens of various display sizes when presenting, ensuring the special effect display effect.
[0113] The following is a description of the case where the target special effect is a two-dimensional special effect. As a specific implementation method, the step of determining the special effect presentation area based on the screen display size can be concretized as follows:
[0114] If the target special effect is a two-dimensional special effect, the original special effect presentation area of the target special effect is proportionally adjusted according to the size ratio of the screen display size to the original display size of the application screen, and the adjusted presentation area is used as the special effect presentation area.
[0115] In this embodiment, if the target special effect is a two-dimensional special effect, since the two-dimensional special effect itself belongs to a two-dimensional plane, no projection conversion is required. Based on this, it is only necessary to determine the size ratio of the screen display size to the original display size of the application screen, and then adjust the original special effect presentation area of the target special effect in proportion, and use the adjusted presentation area as the special effect presentation area. Exemplarily, assuming that the original display size is 9:16 and the screen display size after adjustment is 1:1, the size ratio between the screen display size and the original display size can be determined. Based on the size ratio, the original special effect presentation area of the target special effect is adjusted in proportion, so that the adjusted presentation area is used as the special effect presentation area.
[0116] The above technical solution specifies how to determine the special effect presentation area when the target special effect is a two-dimensional special effect. By adjusting the size ratio of the screen display size before and after, the original special effect presentation area is adjusted proportionally, and the special effect presentation area is determined, so that the target special effect is applicable to application screens of various display sizes when presented, ensuring the special effect display effect.
[0117] Figure 7 A structural diagram of a special effect display device provided by an embodiment of the present disclosure is shown in FIG. Figure 8 As shown, the device includes: a first response module 410 and a second response module 420.
[0118] A first response module 410, configured to display the target special effect in an application screen having a first display size in response to a triggering operation of the target special effect, wherein a first presentation area of the target special effect in the application screen is determined based on the first display size;
[0119] A second response module 420 is used to respond to the size adjustment operation of the application screen and display the application screen according to a second display size corresponding to the size adjustment operation, and the second presentation area of the target special effect in the application screen is determined based on the second display size;
[0120] Among them, the first presentation area ratio is the same as the second presentation area ratio, the first presentation area ratio is the ratio of the area of the first presentation area to the screen area of the application screen under the first display size; the second presentation area ratio is the ratio of the area of the second presentation area to the screen area of the application screen under the second display size.
[0121] The technical solution provided by the embodiment of the present disclosure will accordingly adjust the presentation area of the target special effect in the application screen when the display size of the application screen is adjusted, and the presentation area of the target special effect in the application screen is determined based on the display size of the application screen; when adjusting the presentation area of the target special effect in the application screen, it is necessary to maintain the area ratio of the presentation area of the special effect in the application screen to the screen area of the application screen unchanged, thereby achieving the adaptation of the display size of the presented special effect to application screens of various display sizes, avoiding the situation in the prior art where the display size of the presented special effect is too large or too small, and ensuring the special effect display effect.
[0122] Further, the first display size and the second display size are recorded as screen display sizes, and the first presentation area and the second presentation area are recorded as special effect presentation areas;
[0123] The device also includes a region determination module, which may include:
[0124] A projection plane determining unit, configured to determine a special effect projection plane corresponding to the target special effect if the target special effect is a three-dimensional special effect;
[0125] A visible area determination unit, used to determine a special effect visible area of the target special effect in the special effect projection plane according to the picture display size;
[0126] A presentation area determination unit is used to determine a special effect presentation area of the target special effect in the application screen according to the special effect visible area.
[0127] Furthermore, the projection plane determination unit is specifically used to:
[0128] Obtaining a target special effect three-dimensional model corresponding to the target special effect;
[0129] According to the set projection conversion information, the target special effect three-dimensional model is projected into a two-dimensional plane;
[0130] The two-dimensional plane containing the target special effect after projection is determined as the special effect projection plane of the target special effect.
[0131] Furthermore, the visible area determination unit is specifically used to:
[0132] Obtaining an original field of view angle pre-set relative to the target special effect and an original display size of the application screen on which the special effect presentation depends;
[0133] According to the original field of view angle and the original display size, combined with a given field of view angle display size relationship formula, determine the target field of view angle corresponding to the image display size;
[0134] A special effect visible area of the target special effect is intercepted in the special effect projection plane according to the target field of view angle.
[0135] Furthermore, the area of a first region of the special effect visible area intercepted by the target field of view angle in the special effect projection plane is the same as the area of a second region of the special effect visible area intercepted by the special effect projection plane at the original field of view angle.
[0136] Furthermore, the presentation area determination unit is specifically configured to:
[0137] Determine an original screen area of the application screen at the original display size and an original presentation area of the corresponding original special effect presentation area at the original display size, and determine an application screen area of the application screen at the screen display size;
[0138] Determining the area of the to-be-displayed region according to the ratio of the original presentation area to the original screen area and the application screen area;
[0139] Adjust the special effect visible area according to the area of the to-be-displayed area to obtain the special effect to-be-displayed area;
[0140] Extracting special effect picture information from the special effect to-be-displayed area, and rendering the special effect picture information to the special effect to-be-displayed position in the application screen, to form a special effect presentation area of the target special effect in the application screen;
[0141] The position where the special effect is to be displayed is determined according to the association relationship between the main object included in the application screen and the target special effect.
[0142] Furthermore, the region determination module is also used for:
[0143] If the target special effect is a two-dimensional special effect, the original special effect presentation area of the target special effect is proportionally adjusted according to the size ratio of the screen display size to the original display size of the application screen, and the adjusted presentation area is used as the special effect presentation area.
[0144] The special effects display device provided in the embodiments of the present disclosure can execute the special effects display method provided in any embodiment of the present disclosure, and has functional modules and beneficial effects corresponding to the execution method.
[0145] It is worth noting that the various units and modules included in the above-mentioned device are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the protection scope of the embodiments of the present disclosure.
[0146] Figure 8This is a schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure. Figure 8 , which shows an electronic device (eg, Figure 8 The terminal device in the embodiment of the present disclosure may include but is not limited to mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 8 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0147] like Figure 8 As shown, the electronic device 500 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage device 508 into a random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the electronic device 500 are also stored. The processing device 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An edit / output (I / O) interface 505 is also connected to the bus 504.
[0148] Typically, the following devices may be connected to the I / O interface 505: an input device 506 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 507 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 508 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 509. The communication device 509 may allow the electronic device 500 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 8 The electronic device 500 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.
[0149] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 509, or installed from a storage device 508, or installed from a ROM 502. When the computer program is executed by the processing device 501, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.
[0150] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0151] The electronic device provided in the embodiment of the present disclosure and the special effects display method provided in the above embodiment belong to the same inventive concept. The technical details not fully described in this embodiment can be referred to the above embodiment, and this embodiment has the same beneficial effects as the above embodiment.
[0152] An embodiment of the present disclosure provides a computer storage medium on which a computer program is stored. When the program is executed by a processor, the special effect display method provided in the above embodiment is implemented.
[0153] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0154] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.
[0155] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0156] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device:
[0157] The above-mentioned computer-readable medium carries one or more programs. When the above-mentioned one or more programs are executed by the electronic device, the electronic device: in response to the triggering operation of the target special effect, displays the target special effect in an application screen with a first display size, and the first presentation area of the target special effect in the application screen is determined based on the first display size; in response to the size adjustment operation of the application screen, displays the application screen according to the second display size corresponding to the size adjustment operation, and the second presentation area of the target special effect in the application screen is determined based on the second display size; wherein the first presentation area ratio is the same as the second presentation area ratio, and the first presentation area ratio is the ratio of the area of the first presentation area to the screen area of the application screen under the first display size; the second presentation area is the ratio of the area of the second presentation area to the screen area of the application screen under the second display size.
[0158] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages or a combination thereof, including, but not limited to, object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0159] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0160] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware. The name of a unit does not limit the unit itself in some cases. For example, the first acquisition unit may also be described as a "unit for acquiring at least two Internet Protocol addresses".
[0161] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0162] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0163] According to one or more embodiments of the present disclosure, [Example 1] provides a special effect display method, the method comprising: in response to a trigger operation of a target special effect, displaying the target special effect in an application screen having a first display size, and a first presentation area of the target special effect in the application screen is determined based on the first display size; in response to a size adjustment operation of the application screen, displaying the application screen according to a second display size corresponding to the size adjustment operation, and a second presentation area of the target special effect in the application screen is determined based on the second display size; wherein the first presentation area ratio is the same as the second presentation area ratio, the first presentation area ratio being the ratio of the area of the first presentation area to the area of the application screen at the first display size; and the second presentation area ratio being the ratio of the area of the second presentation area to the area of the application screen at the second display size.
[0164] According to one or more embodiments of the present disclosure, [Example 2] provides a special effect display method, in which the first display size and the second display size are recorded as the screen display size, and the first presentation area and the second presentation area are recorded as the special effect presentation area; the method includes further optimization of the step of determining the special effect presentation area based on the screen display size, which can be specifically optimized as follows: if the target special effect is a three-dimensional special effect, determine the special effect projection plane corresponding to the target special effect; according to the screen display size, determine the special effect visible area of the target special effect in the special effect projection plane; and determine the special effect presentation area of the target special effect in the application screen according to the special effect visible area.
[0165] According to one or more embodiments of the present disclosure, [Example Three] provides a special effects display method, which includes further optimizing the special effects projection plane corresponding to the target special effect, and can be specifically optimized as follows: obtaining a target special effects three-dimensional model corresponding to the target special effect; projecting the target special effects three-dimensional model into a two-dimensional plane according to set projection conversion information; and determining the two-dimensional plane containing the target special effect after projection as the special effects projection plane of the target special effect.
[0166] According to one or more embodiments of the present disclosure, [Example Four] provides a special effects display method, which includes further optimizing the special effects visible area of the target special effect in the special effects projection plane according to the screen display size. Specifically, the optimization can be as follows: obtaining an original field of view angle that is pre-set relative to the target special effect and an original display size of the application screen on which the special effects presentation depends; determining a target field of view angle corresponding to the screen display size according to the original field of view angle and the original display size, in combination with a given field of view angle-display size relationship; and intercepting the special effects visible area of the target special effect in the special effects projection plane according to the target field of view angle.
[0167] According to one or more embodiments of the present disclosure, [Example Five] provides a special effects display method, which can optimize the first area of the special effect visible area intercepted by the target field of view angle in the special effect projection plane to be the same as the second area of the special effect visible area intercepted by the special effect projection plane at the original field of view angle.
[0168] According to one or more embodiments of the present disclosure, [Example Six] provides a special effect display method, which includes further optimizing the special effect presentation area of the target special effect in the application screen determined according to the special effect visible area, and can be specifically optimized as follows: determining the original screen area of the application screen under the original display size and the original presentation area of the corresponding original special effect presentation area under the original display size, and determining the application screen area of the application screen under the screen display size; determining the area of the area to be displayed according to the area ratio of the original presentation area to the original screen area and the application screen area; adjusting the special effect visible area according to the area of the area to be displayed to obtain the special effect area to be displayed; extracting the special effect screen information in the special effect area to be displayed, and rendering the special effect screen information to the special effect to be displayed position in the application screen to constitute the special effect presentation area of the target special effect in the application screen; wherein, the special effect to be displayed position is determined according to the association relationship between the main object contained in the application screen and the target special effect.
[0169] According to one or more embodiments of the present disclosure, [Example Seven] provides a special effects display method, which includes further optimizing the step of determining the special effects presentation area based on the screen display size. Specifically, it can be optimized as follows: if the target special effect is a two-dimensional special effect, then the original special effects presentation area of the target special effect is proportionally adjusted according to the size ratio of the screen display size to the original display size of the application screen, and the adjusted presentation area is used as the special effects presentation area.
[0170] According to one or more embodiments of the present disclosure, [Example Eight] provides a special effects display device, which includes: a first response module, used to respond to a trigger operation of a target special effect, to display the target special effect in an application screen having a first display size, and a first presentation area of the target special effect in the application screen is determined based on the first display size; a second response module, used to respond to a size adjustment operation of the application screen, to display the application screen according to a second display size corresponding to the size adjustment operation, and a second presentation area of the target special effect in the application screen is determined based on the second display size; wherein the first presentation area ratio is the same as the second presentation area ratio, and the first presentation area ratio is the ratio of the area of the first presentation area to the screen area of the application screen at the first display size; and the second presentation area ratio is the ratio of the area of the second presentation area to the screen area of the application screen at the second display size.
[0171] According to one or more embodiments of the present disclosure, [Example 9] provides an electronic device, which includes one or more processors; a storage device for storing one or more programs, when the one or more programs are executed by the one or more processors, the one or more processors implement the special effects display method as described in any one of the above Examples 1 to Example 7.
[0172] According to one or more embodiments of the present disclosure, [Example 10] provides a storage medium containing computer executable instructions, which, when executed by a computer processor, are used to execute the special effects display method described in any one of Examples 1 to 7.
[0173] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.
[0174] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.
[0175] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.
Claims
1. A special effects display method, characterized in that: include: In response to a triggering operation of a target special effect, displaying the target special effect in an application screen having a first display size, wherein a first presentation area of the target special effect in the application screen is determined based on the first display size; In response to a resizing operation on the application screen, displaying the application screen according to a second display size corresponding to the resizing operation, and determining a second presentation area of the target special effect in the application screen based on the second display size; Among them, the first presentation area ratio is the same as the second presentation area ratio, the first presentation area ratio is the ratio of the area of the first presentation area to the screen area of the application screen under the first display size; the second presentation area ratio is the ratio of the area of the second presentation area to the screen area of the application screen under the second display size.
2. The method according to claim 1, characterized in that The first display size and the second display size are recorded as screen display sizes, and the first presentation area and the second presentation area are recorded as special effect presentation areas; The step of determining the special effect presentation area based on the screen display size comprises: If the target special effect is a three-dimensional special effect, determining a special effect projection plane corresponding to the target special effect; Determining a special effect visible area of the target special effect in the special effect projection plane according to the screen display size; The special effect presentation area of the target special effect in the application screen is determined according to the special effect visible area.
3. The method according to claim 2, characterized in that The determining of the special effect projection plane corresponding to the target special effect includes: Obtaining a target special effect three-dimensional model corresponding to the target special effect; According to the set projection conversion information, the target special effect three-dimensional model is projected into a two-dimensional plane; The two-dimensional plane containing the target special effect after projection is determined as the special effect projection plane of the target special effect.
4. The method according to claim 2, characterized in that: Determining the special effect visible area of the target special effect in the special effect projection plane according to the screen display size includes: Obtaining an original field of view angle pre-set relative to the target special effect and an original display size of the application screen on which the special effect presentation depends; According to the original field of view angle and the original display size, combined with a given field of view angle display size relationship formula, determine the target field of view angle corresponding to the image display size; A special effect visible area of the target special effect is intercepted in the special effect projection plane according to the target field of view angle.
5. The method according to claim 4, characterized in that The area of a first region of the special effect visible area intercepted by the target field of view angle in the special effect projection plane is the same as the area of a second region of the special effect visible area intercepted by the special effect projection plane at the original field of view angle.
6. The method according to claim 2, characterized in that The determining, according to the special effect visible area, a special effect presentation area of the target special effect in the application screen includes: Determine an original screen area of the application screen at the original display size and an original presentation area of the corresponding original special effect presentation area at the original display size, and determine an application screen area of the application screen at the screen display size; Determining the area of the to-be-displayed region according to the ratio of the original presentation area to the original screen area and the application screen area; Adjust the special effect visible area according to the area of the to-be-displayed area to obtain the special effect to-be-displayed area; Extracting special effect picture information from the special effect to-be-displayed area, and rendering the special effect picture information to the special effect to-be-displayed position in the application screen, to form a special effect presentation area of the target special effect in the application screen; The position where the special effect is to be displayed is determined according to the association relationship between the main object included in the application screen and the target special effect.
7. The method according to claim 2, characterized in that The step of determining the special effect presentation area based on the screen display size comprises: If the target special effect is a two-dimensional special effect, the original special effect presentation area of the target special effect is proportionally adjusted according to the size ratio of the screen display size to the original display size of the application screen, and the adjusted presentation area is used as the special effect presentation area.
8. A special effects display device, characterized in that: include: A first response module, configured to display the target special effect in an application screen having a first display size in response to a triggering operation of the target special effect, wherein a first presentation area of the target special effect in the application screen is determined based on the first display size; A second response module, configured to respond to a size adjustment operation on the application screen and display the application screen according to a second display size corresponding to the size adjustment operation, wherein a second presentation area of the target special effect in the application screen is determined based on the second display size; Among them, the first presentation area ratio is the same as the second presentation area ratio, the first presentation area ratio is the ratio of the area of the first presentation area to the screen area of the application screen under the first display size; the second presentation area is the ratio of the area of the second presentation area to the screen area of the application screen under the second display size.
9. An electronic device, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the special effects display method as described in any one of claims 1-7.
10. A storage medium containing computer executable instructions, characterized in that: The computer executable instructions are used to execute the special effects display method as described in any one of claims 1-7 when executed by a computer processor.
Citation Information
Patent Citations
Special effect display method and device for live broadcast room, electronic equipment and computer medium
CN111506241A
Special effect prop display method and device, equipment and storage medium
CN114445600A
Method and device for interaction between devices and medium
CN115079969A
Information terminal and control program
JP2015005129A