Observation picture processing method and apparatus, and device and storage medium
By adjusting the height and visual weight of the virtual camera, the problem of the difference in the visual value of the view on different screens was solved, achieving a balance between the fairness of virtual competition and the efficiency of human-computer interaction.
Patent Information
- Application Number
- PCT/CN2025/087669
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-05-22
- Filing Date
- 2025-04-08
- Publication Date
- 2025-11-27
AI Technical Summary
When virtual environments are displayed on terminal screens with different aspect ratios, the value of the field of view varies, affecting the fairness of virtual competitions.
By adjusting the height of the virtual camera, the aspect ratio of the first screen to the second screen is made greater than the area ratio of the first region to the second region. This ensures that the area difference of the observed image on different screens is reduced. Visual weights are used to adjust the importance of the observed image and balance the efficiency of human-computer interaction.
It reduces the difference in visual value of images viewed on screens with different aspect ratios, and improves the fairness of virtual competition and the efficiency of human-computer interaction in virtual environments.
Smart Images

Figure CN2025087669_27112025_PF_FP_ABST
Abstract
Description
Method, device and equipment for processing observation picture and storage medium
[0001] The present application claims priority from the Chinese patent application No. 202410642441.5 filed on May 22, 2024 and entitled "Method, device and equipment for processing observation picture and storage medium", the whole content of which is incorporated herein by reference. TECHNICAL FIELD
[0002] The present application relates to the field of human-computer interaction, and in particular to a method, device and equipment for processing observation picture and storage medium. BACKGROUND
[0003] In an application program providing a virtual environment, a virtual character controlled usually needs to perform activities in the virtual environment, such as walking, driving, climbing, picking up objects, etc.
[0004] In the related art, a virtual camera is deployed in the virtual environment to observe the virtual environment, and an imaging picture of the virtual camera is displayed on a terminal as an observation picture of the virtual environment, so as to present the appearance in the virtual environment to a user.
[0005] However, there are various types of terminals, and the aspect ratios of terminal screens are also different. How to ensure that the observation pictures of the virtual environment displayed on screens with different aspect ratios have similar field of view values is a problem to be solved. SUMMARY
[0006] The present application provides a method, device and equipment for processing observation picture and storage medium, and the technical solution is as follows:
[0007] According to an aspect of the present application, a method for processing observation picture is provided, which is executed by a terminal, and the method comprises:
[0008] When a first observation picture is displayed on a first screen with a first aspect ratio, the first observation picture is an observation result of a first area in a virtual environment, and the area of the first area in the virtual environment is a first area;
[0009] When a second observation picture is displayed on a second screen with a second aspect ratio, the second observation picture is an observation result of a second area in the virtual environment, and the area of the second area in the virtual environment is a second area;
[0010] The ratio between the first aspect ratio and the second aspect ratio is a first ratio, the ratio between the first area and the second area is a second ratio, and the first ratio is greater than the second ratio; the first screen and the second screen are different screens of the same terminal, or the first screen and the second screen are different screens of different terminals.
[0011] According to another aspect of the present application, a processing device for an observation picture is provided, and the device comprises:
[0012] The display module is configured to display a first observation picture on a first screen with a first aspect ratio, the first observation picture being an observation result of a first region in a virtual environment, and the first region having a first area in the virtual environment;
[0013] The display module is further configured to display a second observation picture on a second screen with a second aspect ratio, the second observation picture being an observation result of a second region in the virtual environment, and the second region having a second area in the virtual environment;
[0014] The ratio between the first aspect ratio and the second aspect ratio is a first ratio, the ratio between the first area and the second area is a second ratio, and the first ratio is greater than the second ratio; the first screen and the second screen are different screens of the same terminal, or the first screen and the second screen are different screens of different terminals.
[0015] According to another aspect of the present application, a computer device is provided, which comprises a processor and a memory, and the memory stores at least one instruction, at least one program, a code set or an instruction set, which are loaded and executed by the processor to implement the observation picture processing method according to the above aspect.
[0016] According to another aspect of the present application, a computer readable storage medium is provided, which stores at least one instruction, at least one program, a code set or an instruction set, which are loaded and executed by a processor to implement the observation picture processing method according to the above aspect.
[0017] According to another aspect of the present application, a computer program product is provided, which comprises computer instructions stored in a computer readable storage medium, and a processor reads and executes the computer instructions from the computer readable storage medium to implement the observation picture processing method according to the above aspect.
[0018] The technical scheme provided in the application has at least the following beneficial effects:
[0019] The first area in the virtual environment is displayed on the first screen with the first aspect ratio, and the second area in the virtual environment is displayed on the second screen with the second aspect ratio. By constraining the first ratio between the aspect ratios of the first screen and the second screen to be greater than the ratio between the area of the first area and the area of the second area, the difference in the corresponding areas in the virtual environment of the display pictures on the screens with different aspect ratios is reduced, and the difference in the field of vision values of the observation pictures displayed on the screens with different aspect ratios is reduced, so that the human-computer interaction efficiency when the observation pictures of the virtual environment are displayed on the screens with different aspect ratios is balanced, and the fairness of performing the virtual competition in the virtual environment is ensured. BRIEF DESCRIPTION OF DRAWINGS
[0020] FIG. 1 is a structural block diagram of a computer system provided in an example embodiment of the present application;
[0021] FIG. 2 is a schematic diagram of an observation picture provided in an example embodiment of the present application;
[0022] FIG. 3 is a schematic diagram of a processing method of an observation picture provided in an example embodiment of the present application;
[0023] FIG. 4 is a flowchart of a processing method of an observation picture provided in an example embodiment of the present application;
[0024] FIG. 5 is a flowchart of a processing method of an observation picture provided in an example embodiment of the present application;
[0025] FIG. 6 is a flowchart of a processing method of an observation picture provided in an example embodiment of the present application;
[0026] FIG. 7 is a schematic diagram of an observation picture provided in an example embodiment of the present application;
[0027] FIG. 8 is a schematic diagram of a visual weight provided in an example embodiment of the present application;
[0028] FIG. 9 is a flowchart of a processing method of an observation picture provided in an example embodiment of the present application;
[0029] FIG. 10 is a flowchart of a processing method of an observation picture provided in an example embodiment of the present application;
[0030] FIG. 11 is a structural block diagram of a processing device of an observation picture provided in an example embodiment of the present application;
[0031] FIG. 12 is a structural block diagram of a terminal provided in an example embodiment of the present application. DETAILED DESCRIPTION
[0032] FIG. 1 shows a structural block diagram of a computer system according to an example embodiment of the present application. The computer system 100 includes a first terminal 110, a server 120, and a second terminal 130.
[0033] The first terminal 110 is installed and runs a client 111 supporting a virtual environment, which can be a multiplayer online battle program. When the first terminal runs the client 111, a user interface of the client 111 is displayed on a screen of the first terminal 110. The client 111 can be any one of a battle royale shooting game, a virtual reality (VR) application, an augmented reality (AR) program, a three-dimensional map program, a virtual reality game, an augmented reality game, a first-person shooting game (FPS), a third-person shooting game (TPS), a multiplayer online battle arena game (MOBA), a simulation game (SLG), and a real-time strategy game (RTS). In this embodiment, the client 111 is taken as an example of an FPS game. The first terminal 110 is a terminal used by a first user 112, and the first user 112 uses the first terminal 110 to control a first virtual character in a virtual environment to perform activities. The first virtual character can be referred to as a virtual character of the first user 112. The activities of the first virtual character include, but are not limited to, at least one of moving, jumping, teleporting, releasing a skill, using a prop, adjusting a body posture, crawling, walking, running, riding, flying, jumping, driving, picking up, shooting, attacking, and throwing. Illustratively, the first virtual character is a first virtual character, such as a simulated character or an animation character.
[0034] The second terminal 130 installs and runs a client 131 supporting a virtual environment, which can be a multiplayer online battle program. When the second terminal 130 runs the client 131, a user interface of the client 131 is displayed on a screen of the second terminal 130. The client can be any one of a battle royale shooting game, a VR application, an AR program, a three-dimensional map program, a virtual reality game, an augmented reality game, an FPS, a TPS, a MOBA, an SLG, and an RTS, and in this embodiment, the client is taken as an example of a MOBA game. The second terminal 130 is a terminal used by a second user 132, and the second user 132 uses the second terminal 130 to control a second virtual character in a virtual environment to perform activities, and the second virtual character can be referred to as a virtual character of the second user 132. Illustratively, the second virtual character is a second virtual character, such as a simulated character or an animation character.
[0035] Optionally, the first virtual character and the second virtual character are in the same virtual environment. Optionally, the first virtual character and the second virtual character can belong to the same camp, the same team, the same organization, have a friendship relationship, or have temporary communication authority. Optionally, the first virtual character and the second virtual character can belong to different camps, different teams, different organizations, or have an enemy relationship.
[0036] Optionally, the clients installed on the first terminal 110 and the second terminal 130 are the same, or the clients installed on the two terminals are the same type of client on different operating system platforms (Android or IOS). The first terminal 110 can be taken as one of a plurality of terminals, and the second terminal 130 can be taken as another of the plurality of terminals, and in this embodiment, the first terminal 110 and the second terminal 130 are taken as examples. The device types of the first terminal 110 and the second terminal 130 are the same or different, and the device types include at least one of a smartphone, a tablet computer, an e-book reader, an MP3 player, an MP4 player, a laptop computer, and a desktop computer.
[0037] Only two terminals are shown in FIG. 1, but in different embodiments, a plurality of other terminals 140 can access the server 120. Optionally, one or more terminals 140 are developer corresponding terminals, and a development and editing platform supporting the virtual environment is installed on the terminal 140, and a developer can edit and update the client on the terminal 140, and the updated client installation package is transmitted to the server 120 through a wired or wireless network, and the first terminal 110 and the second terminal 130 can download the client installation package from the server 120 to update the client.
[0038] The first terminal 110, the second terminal 130, and the other terminals 140 are connected to the server 120 through a wireless network or a wired network.
[0039] The server 120 comprises at least one of a server, a plurality of servers, a cloud computing platform, and a virtualization center. The server 120 is configured to provide background services for clients supporting a three-dimensional virtual environment. Optionally, the server 120 undertakes major computing work, and the terminal undertakes secondary computing work; or the server 120 undertakes secondary computing work, and the terminal undertakes major computing work; or the server 120 and the terminal adopt a distributed computing architecture for collaborative computing.
[0040] In an illustrative example, the server 120 comprises a processor 122, a user account database 123, a battle service module 124, and a user-oriented input / output interface (I / O interface) 125. The processor 122 is configured to load instructions stored in the server 120, and process data in the user account database 123 and the battle service module 124. The user account database 123 is configured to store data of user accounts used by the first terminal 110, the second terminal 130, and other terminals 140, such as avatars of the user accounts, nicknames of the user accounts, battle power indexes of the user accounts, and service areas where the user accounts are located. The battle service module 124 is configured to provide a plurality of battle rooms for users to battle, such as 1V1 battles, 3V3 battles, 5V5 battles, and the like. The user-oriented I / O interface 125 is configured to establish communication with the first terminal 110 and / or the second terminal 130 through a wireless network or a wired network to exchange data.
[0041] The method provided in the present application can be applied to at least one of the following scenarios, but is not limited to: a virtual reality application program, a three-dimensional map program, a first-person shooting game (FPS), a third-person shooting game (TPS), a multiplayer online battle arena game (MOBA), a multiplayer gun battle survival game, and the like. The following embodiments are exemplarily described in the application in a game.
[0042] FIG. 2 shows a schematic diagram of an observation view according to an example embodiment of the present application.
[0043] In the present embodiment, a first aspect ratio of the first screen 210 is 2:1, and a second aspect ratio of the second screen 220 is 5:4. For example, the first screen 210 is a screen of a smart phone terminal, and the second screen 220 is a screen of an external display of a personal computer.
[0044] In the related art, the first observation picture displayed on the first screen 210 is the observation result of the initial area 231 in the virtual environment. The second observation picture displayed on the second screen 220 is the observation result of the cropped area 232 in the virtual environment.
[0045] The ratio between the first aspect ratio and the second aspect ratio is the first ratio, i.e., the ratio of 2 to 1.25, which is equal to 1.6.
[0046] In the related art, it is necessary to ensure that the ratio of the areas corresponding to the observation pictures displayed on the two screens in the virtual environment is equal to the first ratio (i.e., 1.6); it can be seen that the cropped area 232 is cropped from the initial area 231, and a strip-shaped area is cropped on the left and right sides of the initial area 231 respectively, to obtain the cropped area 232 with the same width as the initial area 231 and the second aspect ratio. This will cause the display area of the information in the virtual environment to be different for terminals with different aspect ratios, i.e., the aspect ratio of the screen is proportional to the area corresponding to the displayed observation picture in the virtual environment; and further, the field of view of the displayed observation picture will be different when the player uses a screen with a different aspect ratio, and the field of view of the displayed observation picture will be larger when a screen with a larger aspect ratio is used, resulting in that the first user using the screen with a larger aspect ratio has a higher observation efficiency in the virtual environment than the second user using the screen with a smaller aspect ratio, and obtains more information presented in a visual manner in the virtual environment, resulting in an unfair problem in the virtual competition in the virtual environment.
[0047] FIG. 3 shows a schematic diagram of an observation picture processing method according to an example embodiment of the present application. In this embodiment, a virtual camera deployed in the virtual environment is used to observe the virtual environment. The grid shown in dashed lines in subgraph (a) and subgraph (b) is the horizontal plane of the virtual environment.
[0048] As shown in subgraph (a), the virtual camera observes the virtual environment from a top-down perspective at a first height 412. The first observation picture obtained by the virtual camera at the first height 412 matches the first screen 210 with the first aspect ratio in subgraph (d), and the area corresponding to the first observation picture in the virtual environment is a first area 415, which has the same aspect ratio (e.g., 2:1) as the first screen.
[0049] For the second screen with the second aspect ratio, and the first aspect ratio is greater than the second aspect ratio (e.g. 5:4), if the virtual camera keeps the first height 412 unchanged (i.e. the display mode in the related art introduced in FIG. 2), the obtained observation picture is called an equal-height observation picture, which corresponds to the modified region 416 in the virtual environment. The modified region is shown in sub-figure (a) in a way of thickened frame line, to distinguish from the first region 415. In sub-figure (a), the first aspect ratio is greater than the second aspect ratio, and the ratio between the first aspect ratio and the second aspect ratio is a first ratio; the ratio between the area of the first region 415 and the area of the modified region 416 is equal to the first ratio.
[0050] As shown in sub-figure (b), the virtual camera observes the virtual environment from a top view at a second height 422 (the second height 422 is greater than the first height 412). The second observation picture obtained by the virtual camera at the second height 422 matches the second screen 220 with the second aspect ratio in sub-figure (e), and the corresponding region of the virtual environment of the second observation picture is the second region 425, and the aspect ratio of the second region is the same as the second aspect ratio of the second screen (e.g. 5:4).
[0051] It should be noted that when the virtual camera observes the virtual environment, a view cone is formed, as shown in sub-figure (b), which is a quadrangular pyramid with the second region 425 as the bottom surface and the position of the virtual camera as the top vertex. At a distance of the first height 412 from the position of the virtual camera, the cross section 426 of the view cone is a rectangle with the second aspect ratio, and the size of the rectangle is the same as the area of the modified region 416 in sub-figure (a). Since the observation picture obtained by the camera model observation conforms to the human eye observation rule of "near large and far small", the area of the second region 425 is greater than the area of the modified region 416.
[0052] Sub-figure (c) is a schematic diagram of a top view of the virtual environment. The style of the first region 415 in sub-figure (a) displayed on the screen with the first aspect ratio is the first part 431 in sub-figure (c). The style of the second region 425 in sub-figure (b) displayed on the screen with the second aspect ratio is the second part 432 in sub-figure (c). In the virtual environment, the center points of the first part 431 and the second part 432 are the same, but the second part 432 is not obtained by cropping the first part 431.
[0053] The ratio between the area of the first region 415 and the area of the second region 425 is a second ratio; since the area of the second region 425 is greater than the area of the correction region 416, the second ratio is less than the first ratio, that is, the first ratio is greater than the second ratio. That is to say, in the case that the first aspect ratio is greater than the second aspect ratio and the first height is less than the second height, the first ratio can be ensured to be greater than the second ratio, the difference in the area of the observation picture displayed on the screens with different aspect ratios in the virtual environment is reduced, and the difference in the field of view value of the observation picture displayed on the screens with different aspect ratios is reduced, the human-computer interaction efficiency when displaying the observation picture of the virtual environment on the screens with different aspect ratios is balanced, and the fairness of performing virtual competition in the virtual environment can be improved.
[0054] Next, the processing method of the observation picture will be introduced through the following embodiments.
[0055] FIG. 4 shows a flowchart of a processing method of an observation picture provided by an example embodiment of the present application. The method can be performed by a terminal. The method comprises:
[0056] Step 510: when displaying a first observation picture on a first screen with a first aspect ratio, the first observation picture is an observation result of a first region in a virtual environment;
[0057] Illustratively, the virtual environment is a virtual space provided for at least one virtual character to perform a virtual activity; for example, the virtual character performs virtual competition by initiating a virtual attack in a virtual game. The virtual environment can be any one of a two-dimensional virtual environment, a 2.5-dimensional virtual environment, and a three-dimensional virtual environment.
[0058] Illustratively, the first observation picture and the first screen have the same aspect ratio and match each other. The first observation picture and the first screen matching each other indicates that the first observation picture will not cause the edge of the first screen to have a part that cannot display the observation result of the virtual environment (also referred to as the edge of the first screen having a black border) due to the aspect ratio. It should be noted that in the case that the screen of the terminal is a rounded rectangle, the first aspect ratio is the aspect ratio of the minimum circumscribed rectangle of the rounded rectangle.
[0059] The first observation picture is an observation result of a first region in the virtual environment, and the first region and the first observation picture usually have the same aspect ratio, but the aspect ratio of the two or even the shape of the two can be different, for example, the first observation picture is the result of stretching the observation result of the first region. The area of the first region in the virtual environment is a first area; the area unit of the first area is the area unit in the virtual environment, which can be the same unit as the real world, such as square meters, or a pixel size parameter, such as the number of pixels. The application does not limit the representation of the first area. For example, the first area is the area of the virtual horizontal plane on which the first observation picture is projected in the virtual environment.
[0060] Step 520: when displaying the second observation picture on the second screen with the second aspect ratio, the second observation picture is an observation result of a second region in the virtual environment;
[0061] Similar to the above, the second observation picture and the second screen have the same aspect ratio, and the second observation picture and the second screen match each other. The second observation picture is an observation result of a second region in the virtual environment, and the area of the second region in the virtual environment is a second area.
[0062] For example, the ratio between the first aspect ratio and the second aspect ratio is a first ratio, the ratio between the first area and the second area is a second ratio, and the first ratio is greater than the second ratio. It should be noted that the first screen and the second screen can be different screens of the same terminal, or different screens of different terminals. The application does not limit the number of terminals that perform the observation picture processing method or the number of screens on one terminal. It should be noted that step 510 can be performed before, after or at the same time as step 520, and the application does not limit the execution timing of step 510 and step 520.
[0063] In related technologies, a virtual camera deployed in a virtual environment is used to observe the virtual environment. Optionally, a camera model automatically follows a virtual character in a virtual world, that is, when the position of the virtual character in the virtual world changes, the position of the camera model in the virtual world also changes, and the camera model is always within a preset distance range of the virtual character in the virtual world. Optionally, during the automatic following process, the relative position of the camera model and the virtual character does not change.
[0064] Exemplarily, a three-dimensional model in a world space coordinate system is transformed into a camera space coordinate system through a view matrix, the camera space coordinate system is used to describe coordinates of the three-dimensional model observed through a camera model, such as taking a position of the camera model as a coordinate origin; the three-dimensional model in the camera space coordinate system is transformed into a clipping space coordinate system through a projection matrix, the clipping space coordinate system is used to describe a projection of the three-dimensional model in a view frustum of the camera model, a commonly used perspective projection matrix (a kind of projection matrix) is used to project the three-dimensional model to a model conforming to a human eye observation rule of "near large and far small". Exemplarily, the above-mentioned model transformation matrix, the view matrix and the projection matrix are commonly collectively referred to as a model view projection (MVP) matrix.
[0065] Exemplarily, screen sizes of different terminals are different (such as a common screen size of a tablet computer is 6 to 14 inches, and a common screen size of a mobile terminal is 5 to 8 inches). In the related art, for two screens with different screen sizes but the same aspect ratio, areas of observation pictures of a virtual environment displayed in the virtual environment are the same, such as a mobile terminal and a tablet computer with the same aspect ratio of 16:9, and more pictures in the virtual environment are not displayed due to the larger screen size of the tablet computer. Correspondingly, in order to ensure that the areas of the observation pictures in the virtual environment are the same, a camera height of a virtual camera is unchanged, as introduced above, an observation picture observed by the camera model conforms to the human eye observation rule of "near large and far small"; for two screens with different screen sizes but the same aspect ratio, the unchanged camera height can ensure that the areas of the observation pictures in the virtual environment are unchanged.
[0066] As introduced above in FIG. 2, in the related art, on the basis of the unchanged camera height, for screens with different aspect ratios, areas of observation pictures displayed on the screens corresponding in the virtual environment change with changes of the aspect ratios of the screens, that is, the aspect ratio of the screen is proportional to the area of the observation picture displayed on the screen corresponding in the virtual environment. This can cause that different aspect ratio terminals display different areas of information in the virtual environment, and a player can obtain more information in the virtual environment by using a terminal with a larger aspect ratio screen.
[0067] In various embodiments of the present application, the ratio of the length-width ratios between different screens is greater than the ratio of the areas of the observation pictures in the virtual environment (i.e., the first ratio is greater than the second ratio), which reduces the difference in the areas of the observation pictures displayed on screens with different length-width ratios in the virtual environment, and balances the human-computer interaction efficiency when displaying the observation pictures of the virtual environment on screens with different length-width ratios. In some optional examples, in order to further constrain the difference in the areas of the observation pictures displayed on screens with different length-width ratios in the virtual environment, the second ratio belongs to a preset range. For example, the preset range is a pre-set empirical value, such as a value of the preset range including 1; further, the value of the preset range is less than (or less than or equal to) a and greater than (or greater than or equal to) 1 / a, where a is an empirical value greater than 1, such as 1.2. a is used to indicate the maximum difference ratio of the areas of the observation pictures displayed on screens with different length-width ratios in the virtual environment, and a value of 1.2 indicates that the maximum difference ratio of the areas of the observation pictures displayed on screens with different length-width ratios in the virtual environment is 1.2-1=20%.
[0068] In summary, the method provided in the present embodiment displays a first region in a virtual environment on a first screen with a first length-width ratio and displays a second region in the virtual environment on a second screen with a second length-width ratio, and by constraining the first ratio between the length-width ratios of the first screen and the second screen to be greater than the ratio between the area of the first region and the area of the second region, the difference in the corresponding areas of the display pictures in the virtual environment on screens with different length-width ratios is reduced, the difference in the field of view values of the observation pictures displayed on screens with different length-width ratios is further reduced, the human-computer interaction efficiency when displaying the observation pictures of the virtual environment on screens with different length-width ratios is balanced, and the fairness of performing virtual competitions in the virtual environment is ensured.
[0069] FIG. 5 shows a flowchart of a method for processing an observation picture according to an example embodiment of the present application. The method can be performed by a terminal. That is, in the embodiment shown in FIG. 4, step 510 can be implemented as step 512, and step 520 can be implemented as step 522:
[0070] Step 512: when displaying a first observation picture on a first screen with a first length-width ratio, observing the first observation picture by a virtual camera located at a first height in a virtual environment;
[0071] As described above, the virtual environment is observed by a virtual camera deployed in the virtual environment. The present embodiment takes a virtual camera observing a virtual environment from a top view as an example for description. For example, when the virtual camera observes the virtual environment from a top view, the length-width ratio of the first region displayed on the first display picture is the same as the first length-width ratio of the first screen.
[0072] Step 522: when the second screen displays the second observation picture in the second length-width ratio, the second observation picture is observed by the virtual camera at the second height in the virtual environment;
[0073] Similarly, it is exemplary that when the virtual camera observes the virtual environment in the top view, the length-width ratio of the second area displayed by the second display picture is the same as the second length-width ratio of the second screen. Wherein, the first length-width ratio is greater than the second length-width ratio, and the first height is less than the second height. For the details of the first height and the second height, please refer to FIG. 3 in the above, which will not be repeated here.
[0074] In summary, the method provided by the embodiment displays the first area in the virtual environment on the first screen with the first length-width ratio, and displays the second area in the virtual environment on the second screen with the second length-width ratio. By increasing the height of the virtual camera, the first ratio between the length-width ratio of the first screen and the second screen is greater than the ratio between the area of the first area and the area of the second area, which reduces the difference between the corresponding areas of the display pictures on the screens with different length-width ratios in the virtual environment, and further reduces the difference in the field of view value of the observation pictures displayed on the screens with different length-width ratios, balances the human-computer interaction efficiency when displaying the observation pictures of the virtual environment on the screens with different length-width ratios, and ensures the fairness of the virtual competition in the virtual environment.
[0075] Through the above introduction, the height of the virtual camera and the area of the virtual environment corresponding to different observation pictures are introduced. Next, the observation picture is further introduced as follows.
[0076] In an optional implementation, based on the embodiment shown in FIG. 5, the first observation picture is the observation result of the first area in the virtual environment, and the first area includes n sub-areas; each sub-area includes at least one pixel point; the number of pixel points included in the sub-area and the length-width ratio of the sub-area are not limited by the embodiment, and the sizes of different sub-areas are usually the same, but the sizes of different sub-areas are not excluded. It should be noted that the n sub-areas included in the first area do not overlap with each other, and each position point in the first area has a sub-area to which it belongs.
[0077] The n sub-regions correspond to the n visual weights one-to-one; that is, each sub-region has a corresponding visual weight, and the visual weight is used to indicate the importance of the sub-region in the first observation picture. The part located at the center point in the first observation picture has a higher importance compared to the part located at the edge of the first observation picture. The visual weight corresponding to the part located at the center point of the first observation picture is greater than the visual weight corresponding to the part located at the edge of the first observation picture. For example, the i-th visual weight in the n visual weights is in a negative correlation with the i-th distance, and the i-th distance is the distance between the i-th sub-region in the n sub-regions and the center point of the first region; n is an integer greater than 1, and i is a positive integer not greater than n.
[0078] For example, the negative correlation between the i-th visual weight and the i-th distance can be constructed based on at least one of a linear function, a quadratic function, an exponential function, or a logarithmic function, and the present application does not limit this. The negative correlation is only used to constrain the visual weight to decrease with the increase of the distance.
[0079] Further, in the first observation picture, there is a visual salient region, and the visual salient region is a region including the center point of the first observation picture. For example, the first sub-region in the visual salient region corresponds to a visual that is obtained based on a first function, and the independent variable of the first function is the position of the first sub-region in the first observation picture. The dependent variable of the first function is determined as the visual weight. The second sub-region in other regions outside the visual salient region is obtained based on a second function. Similarly, the independent variable of the second function is the position of the second sub-region in the first observation picture, and the dependent variable of the second function is determined as the visual weight. For example, the difference between the maximum value of the second function and the minimum value of the first function is greater than a difference threshold.
[0080] For example, the sum of the n visual weights is a first value. The first value can be a fixed value set in advance, or can be set based on human-computer interaction or information in a virtual environment.
[0081] In one example, the first value is a fixed value. In the development process of an application program providing a virtual environment, the initial imaging scale of a virtual camera displays an initial region in the virtual environment, and the initial region includes at least two sub-regions. The at least two sub-regions correspond to at least two visual weights one-to-one, and the visual weights of the sub-regions in the initial region are calculated in the same way as the visual weights of the first region described above. The first value is the sum of the visual weights of the at least two sub-regions in the initial region.
[0082] In another example, the first value is set according to a human-computer interaction mode. The application program providing the virtual environment provides a setting interface of the first value, for a user of the application program to set the first value.
[0083] In yet another example, the terminal performing the embodiment is a control terminal of a first virtual role, and the control terminal has a control right of the first virtual role. The first value is set to x in a case where virtual activities of the first virtual role in a virtual environment meet a constraint threshold; and the first value is set to y in a case where virtual activities of the first virtual role in the virtual environment meet the constraint threshold; wherein the constraint threshold includes that a number of times that the first virtual role is continuously knocked down exceeds a first value (such as 3 times), and an enemy virtual role exceeds a second value of virtual levels of the first virtual role (such as exceeding 5 levels of virtual levels). x is greater than y; in a case where the first virtual role is in a significant disadvantage in a virtual competition in the virtual environment, by setting the first value to a larger value, the control party of the first virtual role obtains higher value picture information on the control terminal, which is conducive to balancing virtual competition abilities of different virtual objects in the virtual environment, and avoiding the problem that the control party of the first virtual role is in a significant disadvantage and causes negative participation in the virtual competition.
[0084] Further optionally, the second observation picture is an observation result of a second region in the virtual environment, the second region includes m sub-regions, each of the m sub-regions includes at least one pixel point; and similarly as in the above, the number of pixel points, the length-width ratio, the size, etc. of the sub-region are not limited. The m sub-regions in the second region are mutually non-overlapping, and each position point in the second region has a sub-region to which it belongs.
[0085] The m sub-regions correspond to m visual weights one by one; and similarly as the visual weight corresponding to the sub-region in the first region, the jth visual weight in the m visual weights is in a negative correlation relationship with a jth distance, the jth distance is a distance between the jth sub-region in the m sub-regions and a center point of the second region; m is an integer greater than 1, and j is a positive integer not greater than m. The jth visual weight and the jth distance are in a negative correlation relationship, and the negative correlation relationship between the visual weight of the sub-region in the first region and the distance can be the same or different.
[0086] Exemplarily, a sum of the m visual weights is a second value, and similarly as the first value, the second value can be a pre-set fixed value, or can be set based on a human-computer interaction operation or information in the virtual environment.
[0087] In the embodiment, the difference between the first value and the second value does not exceed the difference threshold; the difference threshold is used to constrain the difference between the first value and the second value, which can ensure that the importance of the information presented by the first observation picture to the user of the using party is similar to or even the same as the importance of the information presented by the second observation picture to the user of the using party. On the basis of narrowing the difference in the area of the observation picture displayed on the screen with different length-width ratios in the virtual environment, the visual importance of the information presented by the observation picture on the screen with different length-width ratios is balanced in the dimension of visual importance.
[0088] FIG. 6 shows a flowchart of a method for processing an observation picture according to an example embodiment of the present application. The method can be performed by a terminal. The method includes:
[0089] Step 502: determining s visual weights corresponding to s sub-areas in the virtual environment according to the weight association relationship;
[0090] For example, the candidate area is constructed based on the s sub-areas, and the candidate area includes the s sub-areas. The length-width ratio of the candidate area is a first length-width ratio, and each visual weight in the s visual weights is a visual weight of the corresponding current sub-area relative to the center point of the candidate area, and s is an integer greater than or equal to n;
[0091] For example, the determination manner of the visual weight is similar to the introduction in the first area and the second area above, the weight association relationship is used to indicate a negative correlation between the visual weight and the offset distance, and the offset distance is the distance between the current sub-area corresponding to the visual weight and the center point of the candidate area.
[0092] It should be noted that steps 502 to 506 in the embodiment are used to determine the first height of the virtual camera, but do not limit the position of the candidate area constructed in the process of determining the first height in the virtual environment. The candidate area can be located at any position in the virtual environment, or in other environment with the same metric unit as the virtual environment, and is only used to determine the target area, and then determine that the virtual camera is located at the first height according to the size of the target area. There is no restriction on the position of the candidate area and the virtual object in the candidate area.
[0093] Step 504: screening a target area in the candidate area;
[0094] Since the s visual weights corresponding to the s sub-areas are visual weights relative to the center point of the candidate area, the center point of the target area obtained by screening is the same as the center point of the candidate area. It can be understood that since the center point of the target area is the same as the center point of the candidate area, the smaller the size of the sub-area, the smaller the step when screening the target area.
[0095] For example, the target region has a first aspect ratio, and a sum of the visual weights of each sub-region in the target region has a first value.
[0096] In step 506, the virtual camera is determined to be at a first height based on a size of the target region.
[0097] For example, the size of the target region and the height of the virtual camera have a positive correlation. As shown in subgraph (b) of FIG. 3, as the size of the target region increases, the height of the virtual camera increases. For example, the size of the target region and the first height have a one-to-one corresponding relationship, and the relationship is obtained by the terminal.
[0098] It should be noted that only the determination manner of the virtual camera at the first height in step 512 is introduced in this embodiment. However, it does not exclude that the virtual camera at the second height in step 522 is also determined in a similar manner in some other embodiments. For example, according to the weight correlation relationship, s’ visual weights corresponding to s’ sub-regions in the virtual environment are determined, the aspect ratio of a candidate region constructed based on the s’ sub-regions is a second aspect ratio, each visual weight in the s’ visual weights is a visual weight of a corresponding current sub-region relative to a center point of the candidate region, and s’ is an integer greater than or equal to m. The target region is selected from the candidate region, the center point of the target region is the same as the center point of the candidate region, the aspect ratio of the target region is the second aspect ratio, and a sum of the visual weights of each sub-region in the target region is a second value. The virtual camera is determined to be at the second height based on the size of the target region.
[0099] In step 512, the first observation picture is obtained by the virtual camera at the first height in the virtual environment when the first observation picture is displayed on the first screen with the first aspect ratio.
[0100] As introduced above, the virtual environment is observed by the virtual camera deployed in the virtual environment. This embodiment takes the virtual camera observing the virtual environment through a top-down view as an example for illustration. For example, when the virtual camera observes the virtual environment through the top-down view, the aspect ratio of the first region displayed on the first display picture is the same as the first aspect ratio of the first screen.
[0101] In step 522, the second observation picture is obtained by the virtual camera at the second height in the virtual environment when the second observation picture is displayed on the second screen with the second aspect ratio.
[0102] Similarly, for example, when the virtual camera observes the virtual environment through the top-down view, the aspect ratio of the second region displayed on the second display picture is the same as the second aspect ratio of the second screen.
[0103] wherein the first aspect ratio is greater than the second aspect ratio, and the first height is less than the second height.
[0104] For further description of steps 512 and 522, please refer to the corresponding embodiments of FIG. 5 and the related description of the first region including n sub-regions and the second region including m sub-regions, which will not be repeated here.
[0105] To sum up, the method provided in the embodiment filters out the target region with the first value of the total visual weight from the candidate region based on the visual weight of each sub-region of the candidate region relative to the center point of the candidate region, ensuring that the first observation picture and the second observation picture have the same visual weight; by determining the visual weight of the sub-region, the observation pictures displayed on the first screen and the second screen with different aspect ratios are constrained from the dimension of visual importance, balancing the human-computer interaction efficiency when displaying the observation picture of the virtual environment on the screen with different aspect ratios, and ensuring the fairness of performing virtual competition in the virtual environment.
[0106] Next, the weight correlation is further described. The weight correlation includes a first sub-relation and a second sub-relation.
[0107] In an optional implementation, step 502 in the above can be implemented as the following two sub-steps:
[0108] · determining s1 visual weights corresponding to the s1 sub-regions according to the first sub-relation;
[0109] In the embodiment, the terminal displaying the first observation picture has the control right or the watching right of the first virtual role in the virtual environment. The first sub-relation is used to indicate the negative correlation between the visual weight and the offset distance when the offset distance exceeds the distance threshold.
[0110] The distance threshold is the maximum observation distance of the first virtual role in the virtual environment. Taking a Multiplayer Online Battle Arena Games (MOBA) as an example, the observation distance of the first virtual role to the surrounding is limited, for example, the maximum observation distance is 1000 meters. When the terminal displays the virtual environment beyond the maximum observation distance, there will be a mask color, for example, a black mask, which hides the virtual environment beyond the maximum observation distance, also known as virtual fog.
[0111] Correspondingly, the first sub-relation is used to indicate the visual weight of the virtual position beyond the maximum observation distance. In some examples, the first sub-relation indicates the relationship between the visual weight and the offset distance through a first function, and the first function is different from a second function corresponding to the second sub-relation.
[0112] · according to a second sub-relationship, determining s2 visual weights corresponding to the s2 sub-regions respectively;
[0113] The second sub-relationship in the weight correlation relationship is used to indicate a negative correlation between the visual weight and the offset distance when the offset distance does not exceed the distance threshold; the distance threshold is the maximum observation distance of the first virtual character in the virtual environment;
[0114] In the embodiment, s is the sum of s1 and s2, and s1 and s2 are both positive integers.
[0115] By the first sub-relationship and the second sub-relationship, different correlation relationships are set for different regions within and outside the maximum observation distance of the first virtual character, fully considering the case that there is a mask color outside the maximum observation distance of the first virtual character, which masks the virtual environment outside the maximum observation distance, and it is a special solution designed for the visual range of the first virtual character.
[0116] In an optional implementation, the s sub-regions include a first sub-region, a second sub-region, and a third sub-region; the first offset distance corresponding to the first sub-region and the second offset distance corresponding to the second sub-region both do not exceed the distance threshold, and the third offset distance corresponding to the third sub-region exceeds the distance threshold.
[0117] FIG. 7 shows a schematic diagram of an observation picture according to an example embodiment of the present application. As shown in subgraph (a), the character position 450 is the position of the first virtual character in the virtual environment, and in order to avoid picture occlusion, the first virtual character is not shown in subgraph (a), and only the character position 450 is indicated by a triangle symbol.
[0118] The center position of the first sub-region is the first position 461, the center position of the second sub-region is the second position 462, and the center position of the third sub-region is the third position 463; the first ray 455 is a ray from the character position 450, passing through the first position 461, the second position 462, and the third position 463; it should be noted that FIG. 7 only shows the case that the above three positions are on the same ray, but does not exclude the case that the above three positions are not on the same ray in other examples.
[0119] As introduced above, the first offset distance corresponding to the first sub-region is the straight-line distance from the first position 461 to the character position 450, and the determination manner of the second offset distance and the third offset distance is similar to that of the first offset distance, which will not be repeated one by one. The difference between the first offset distance and the second offset distance is the first difference 471, and the difference between the second offset distance and the third offset distance is the second difference 472, and the first difference and the second difference are equal and both are positive numbers.
[0120] As shown in subgraph (b), the horizontal axis of the two-dimensional coordinate system corresponds to the direction of the first ray 455 in the virtual environment; the vertical axis of the two-dimensional coordinate system is used to indicate the visual weight. The role position 450 in subgraph (a) is the origin 490 of the two-dimensional coordinate system in subgraph (b); the first position 461 in subgraph (a) corresponds to the first horizontal coordinate 491 on the horizontal axis in subgraph (b); similarly, the second position 462 and the third position 463 in subgraph (a) correspond to the second horizontal coordinate 492 and the third horizontal coordinate 493 on the horizontal axis in subgraph (b), respectively.
[0121] As shown in subgraph (b), the function 485 in the two-dimensional coordinate system is used to indicate the weight association relationship, which is used to indicate the visual weight of the coordinates on the distance from the origin 490; in one example, the visual weight corresponding to the origin 490 is 1, and it can be seen that the visual weights at other positions are all less than 1.
[0122] The first visual weight corresponding to the first sub-region is the vertical coordinate value of the function 485 at the first horizontal coordinate 491. As shown in subgraph (b), the difference between the first visual weight corresponding to the first sub-region and the second visual weight corresponding to the second sub-region is the third difference 473, and the difference between the second visual weight corresponding to the second sub-region and the third visual weight corresponding to the third sub-region is the fourth difference 474, and the third difference 473 is less than the fourth difference 474.
[0123] FIG. 8 shows a schematic diagram of a visual weight according to an example embodiment of the present application. The XOY plane corresponds to the horizontal plane of the virtual environment, and the position of the origin on the XOY plane is the position of the first virtual role in the virtual environment. In FIG. 8, the weight association relationship is implemented as a three-dimensional function 486, and the visual weight of a position in the virtual environment is the Z-axis coordinate of the three-dimensional function at the position.
[0124] Further, the first aspect ratio and the second aspect ratio are further introduced as follows:
[0125] On the basis of the embodiment shown in FIG. 4, neither the first aspect ratio nor the second aspect ratio introduced in FIG. 4 belongs to the preset aspect ratio range, which is determined according to the preset screen aspect ratio and the tolerance parameter;
[0126] For example, the preset screen aspect ratio is the initial imaging aspect ratio of the virtual camera in the development process of the application program providing the virtual environment. For example, the initial imaging aspect ratio is the attribute parameter of the virtual camera in the development stage of the application program; for example, 16:9. The development stage of the application program is usually provided with an initial imaging aspect ratio, but it is not excluded that multiple imaging aspect ratios are provided, for example, the initial imaging aspect ratio of a smart phone is 16:7; the initial imaging aspect ratio of a PC (Personal Computer) is 16:9.
[0127] For example, the tolerance parameter is a preset empirical value, such as an initial value set by a developer of the application; the tolerance parameter is a positive number less than 1. Further, the tolerance parameter is less than 20%. The tolerance parameter is used to indicate a constraint threshold for the stretching degree of the observation picture under the preset screen ratio.
[0128] In a case where the ratio of the preset screen ratio is a:b (the greatest common divisor between a and b is 1) and the value of the tolerance parameter is c; in one example, the preset ratio range is a*(1+c):b to a:b*(1+c). In another example, the preset ratio range is (a:b)*(1+c) to (a:b)*(1-c).
[0129] Further optionally, FIG. 9 shows a flowchart of a method for processing an observation picture according to an example embodiment of the present application. The method can be performed by a terminal. That is, based on the embodiment shown in FIG. 4, the method further includes step 530:
[0130] Step 530: when displaying a third observation picture in a third screen with a third length-width ratio, the third observation picture is obtained by stretching a fourth observation picture with a preset screen ratio to the third length-width ratio.
[0131] The third observation picture has the same length-width ratio as the third screen, and the third observation picture and the third screen match each other. The third observation picture is an observation result of a third region in the virtual environment.
[0132] In this embodiment, the third observation picture is obtained by stretching the fourth observation picture with the preset screen ratio to the third length-width ratio; correspondingly, the third region in the virtual environment and the fourth observation picture have the same length-width ratio, i.e., the preset screen ratio.
[0133] For example, the fourth observation picture is an observation picture of the virtual environment obtained by a virtual camera according to an initial imaging ratio; the third length-width ratio belongs to a preset ratio range, and in a case where the third length-width ratio belongs to the preset ratio range, the third length-width ratio has a small difference from the preset screen ratio, the stretching of the fourth observation picture does not exceed the constraint threshold for the stretching degree of the observation picture under the preset screen ratio, and the stretching of the fourth observation picture directly obtains the third observation picture, which balances the display effect of the observation picture and the calculation complexity, avoids the adjustment of the length-width ratio and the height of the imaging picture of the virtual camera, and saves the consumption of calculation resources on the basis of limiting the stretching degree of the observation picture.
[0134] It should be noted that step 530 can be performed before, after or simultaneously with any one of steps 510 and 520, and the present application does not limit the execution timing.
[0135] It should be noted that the first screen, the second screen and the third screen can be different screens of the same terminal, or can be different screens of different terminals. The number of terminals and the number of screens on one terminal is not limited by the present application.
[0136] To sum up, the method provided by the embodiment adopts the stretching manner to obtain the third observation picture for the third screen belonging to the preset proportion range, and the stretching of the fourth observation picture does not exceed the constraint threshold of the stretching degree of the observation picture under the preset screen proportion, so that the stretching of the fourth observation picture directly obtains the third observation picture, which takes into account the display effect and the calculation complexity of the observation picture, avoids the adjustment of the length-width proportion and the height of the imaging picture of the virtual camera, saves the consumption of the calculation resources under the condition that the stretching of the observation picture has little influence on the corresponding area in the virtual environment.
[0137] FIG. 10 shows a flowchart of the processing method of the observation picture provided by one example embodiment of the present application. The method can be executed by a terminal. The method comprises:
[0138] Step 602: judging whether the current length-width proportion of the screen exceeds the preset proportion range;
[0139] For example, the preset proportion range is determined according to the preset screen proportion and the tolerance parameter; the preset screen proportion is the initial imaging proportion of the virtual camera in the development process of the application program providing the virtual environment. The initial imaging proportion is the attribute parameter of the virtual camera in the development stage of the application program; for example, 16:9. The tolerance parameter is a pre-set empirical value, and the tolerance parameter is a positive number less than 1. Further, the tolerance parameter is less than 20%. The tolerance parameter is used to indicate the constraint threshold of the stretching degree of the observation picture under the preset screen proportion. In one example, the initial imaging proportion is 16:9, and the tolerance parameter is 0.1; the preset proportion range is 16*1.1:9 to 16:9*1.1.
[0140] Step 604: stretching the observation picture of the preset screen proportion into a stretched picture of the current length-width proportion;
[0141] In the case where the current length-width proportion of the screen does not exceed the preset proportion range in step 602, step 604 is executed.
[0142] As introduced above, the observation picture of the preset screen ratio (i.e. the observation picture with the length-width ratio of 16:9) is stretched into the stretched picture of the current length-width ratio. In the case that the current length-width ratio of the screen belongs to the preset ratio range, the difference between the current length-width ratio of the screen and the preset screen ratio is small, the stretching of the observation picture of the preset screen ratio does not exceed the constraint threshold of the stretching degree of the observation picture, and the stretched picture is directly obtained by performing the stretching, which takes into account the display effect and the calculation complexity of the observation picture of the virtual environment, and avoids the adjustment of the length-width ratio and the height of the imaging picture of the virtual camera. On the basis of ensuring that the stretching degree of the observation picture is limited, the consumption of the calculation resources is saved.
[0143] Step 606: displaying the stretched picture;
[0144] The length-width ratio of the stretched picture is the same as the current length-width ratio of the screen, and the stretched picture and the screen match each other.
[0145] Step 608: calling the virtual camera to observe the virtual environment at the preset height to obtain the initial picture of the current length-width ratio;
[0146] In the case that the current length-width ratio of the screen exceeds the preset ratio range in step 602, step 608 is performed. The preset height is set by the application program providing the virtual environment in the development stage, and is the height of the virtual camera in the virtual environment when the imaging picture has the preset screen ratio. In the case that the height of the virtual camera is kept unchanged (i.e. at the preset height), the length-width ratio of the imaging plane of the virtual camera is adjusted to obtain the initial picture of the current length-width ratio, and the initial picture of the current length-width ratio and the screen of the current length-width ratio match each other.
[0147] Step 610: in the case that the field of view value of the initial picture is greater than the preset value, reducing the height of the virtual camera to obtain the first corrected picture, and the field of view value of the first corrected picture is equal to the preset value;
[0148] The field of view value is the sum of the visual weights of the sub-regions in the initial picture. For the introduction of the visual weight, please refer to the related introduction of the n sub-regions and the m sub-regions in the above text, which will not be repeated here.
[0149] In this step, in the case that the field of view value of the initial picture is greater than the preset value, the height of the virtual camera is reduced. The first corrected picture obtained after the height of the virtual camera is reduced includes a smaller number of sub-regions compared with the initial picture, and the field of view value of the first corrected picture is smaller than the field of view value of the initial picture.
[0150] The first modified picture is a subset of the initial picture, and a field of view value of the first modified picture is equal to the preset value. For details of the preset value, refer to the first value and the second value in the foregoing description, which will not be repeated here.
[0151] In step 612, in a case where the field of view value of the initial picture is less than the preset value, the height of the virtual camera is raised to obtain a second modified picture, and a field of view value of the second modified picture is equal to the preset value.
[0152] In this step, in a case where the field of view value of the initial picture is less than the preset value, the height of the virtual camera is raised. The second modified picture obtained after the height of the virtual camera is raised includes a larger number of sub-regions than the initial picture, and accordingly the field of view value of the second modified picture is greater than the field of view value of the initial picture.
[0153] The initial picture is a subset of the second modified picture, and a field of view value of the second modified picture is equal to the preset value. For details of the preset value, refer to the first value and the second value in the foregoing description, which will not be repeated here.
[0154] Those skilled in the art can understand that the above embodiments can be independently implemented, or the above embodiments can be freely combined to form new embodiments to implement the method for processing the observation picture.
[0155] FIG. 11 shows a structural block diagram of a device for processing an observation picture according to an example embodiment of the present application. The device includes:
[0156] The display module 810 is configured to perform step 510 in the embodiment of FIG. 4. The area of the first region in the virtual environment is the first area. The display module 810 is further configured to perform step 520 in the embodiment of FIG. 4. The area of the second region in the virtual environment is the second area. The ratio between the first aspect ratio and the second aspect ratio is the first ratio, and the ratio between the first area and the second area is the second ratio. The first ratio is greater than the second ratio. The first screen and the second screen are different screens of the same terminal, or the first screen and the second screen are different screens of different terminals.
[0157] In an optional implementation of the embodiment, the display module 810 is further configured to perform step 512 and step 522 in the embodiment of FIG. 5. The first aspect ratio is greater than the second aspect ratio, and the first height is less than the second height.
[0158] In an optional implementation of the embodiment, the first region includes n sub-regions, and the n sub-regions correspond to n visual weights one by one. The sum of the n visual weights is the first value.
[0159] wherein an i th visual weight in the n visual weights is negatively correlated with an i th distance, the i th distance being a distance between an i th sub-region in the n sub-regions and a center point of the first region; n is an integer greater than 1, and i is a positive integer not greater than n.
[0160] In an optional implementation of the embodiment, the second region includes m sub-regions, the m sub-regions corresponding to m visual weights in a one-to-one manner; a sum of the m visual weights is a second value, and a difference between the first value and the second value is not more than a difference threshold.
[0161] wherein a j th visual weight in the m visual weights is negatively correlated with a j th distance, the j th distance being a distance between a j th sub-region in the m sub-regions and a center point of the second region; m is an integer greater than 1, and j is a positive integer not greater than m.
[0162] In an optional implementation of the embodiment, the apparatus further includes a processing module 820, configured to: perform step 502 in the embodiment of FIG. 6; each visual weight in the s visual weights being a visual weight of a corresponding current sub-region relative to a center point of the candidate region, s being an integer greater than or equal to n; perform step 504 in the embodiment of FIG. 6; the candidate region including the s sub-regions, a length-width ratio of the candidate region being the first length-width ratio, a center point of the target region and a center point of the candidate region being the same, a length-width ratio of the target region being the first length-width ratio, and a sum of visual weights of each sub-region in the target region being the first value; perform step 506 in the embodiment of FIG. 6; wherein the weight correlation relationship is used to indicate a negative correlation between a visual weight and an offset distance, the offset distance being a distance between a current sub-region corresponding to the visual weight and the center point of the candidate region.
[0163] In an optional implementation of the embodiment, the terminal displaying the first observation picture has a control authority or a spectating authority of a first virtual role in the virtual environment; the weight correlation relationship includes a first sub-relationship and a second sub-relationship; and the processing module 820 is further configured to:
[0164] determine s 1 visual weights corresponding to s 1 sub-regions according to the first sub-relationship;
[0165] determine s 2 visual weights corresponding to s 2 sub-regions according to the second sub-relationship;
[0166] The first sub-relationship in the weight correlation relationship is used to indicate a negative correlation between the visual weight and the offset distance when the offset distance exceeds a distance threshold, and the second sub-relationship in the weight correlation relationship is used to indicate a negative correlation between the visual weight and the offset distance when the offset distance does not exceed the distance threshold. The distance threshold is a maximum observation distance of the first virtual character in the virtual environment, s is a sum of s1 and s2, and s1 and s2 are positive integers.
[0167] In an optional implementation of the embodiment, the s sub-regions include a first sub-region, a second sub-region, and a third sub-region. The first offset distance corresponding to the first sub-region and the second offset distance corresponding to the second sub-region both do not exceed the distance threshold, and a third offset distance corresponding to the third sub-region exceeds the distance threshold.
[0168] The difference between the first offset distance and the second offset distance is a first difference, and the difference between the second offset distance and the third offset distance is a second difference. The first difference is equal to the second difference. The difference between the first visual weight corresponding to the first sub-region and the second visual weight corresponding to the second sub-region is a third difference, and the difference between the second visual weight corresponding to the second sub-region and the third visual weight corresponding to the third sub-region is a fourth difference. The third difference is less than the fourth difference.
[0169] In an optional implementation of the embodiment, the first aspect ratio and the second aspect ratio both do not belong to a preset aspect ratio range. The preset aspect ratio range is determined according to a preset screen aspect ratio and a tolerance parameter. The preset screen aspect ratio is an initial imaging aspect ratio of a virtual camera in an application development process of providing the virtual environment.
[0170] In an optional implementation of the embodiment, the display module 810 is further configured to perform step 530 in the embodiment of FIG. 9. The fourth observation picture is an observation picture of the virtual environment observed by the virtual camera according to the initial imaging aspect ratio. The third aspect ratio belongs to the preset aspect ratio range.
[0171] In an optional implementation of the embodiment, the virtual environment is provided by at least one of a multiplayer online battle arena (MOBA) game and a real-time strategy (RTS) game. The first observation picture and the second observation picture are obtained by observing the virtual environment from a top-down perspective.
[0172] It should be noted that the apparatus provided by the above embodiments, when realizing the functions thereof, are only exemplified by the above division of the functional modules, and in actual application, the above functions can be completed by different functional modules according to actual needs, that is, the content structure of the device is divided into different functional modules to complete all or part of the above-described functions.
[0173] As to the apparatus in the above embodiments, the specific manners in which the modules perform operations have been described in detail in the embodiments of the method; the technical effects achieved by the operations performed by the modules are the same as the technical effects in the embodiments of the method, and will not be described in detail here.
[0174] The embodiments of the present application further provide a computer device, which comprises a processor and a memory, and the memory stores a computer program; the processor is used to execute the computer program in the memory to realize the processing method of the observation picture provided by the above method embodiments.
[0175] FIG. 12 shows a structural block diagram of a terminal provided by an example embodiment of the present application. The terminal 1900 can be a smart phone, a tablet computer, an MP3 (Moving Picture Experts Group Audio Layer III) player, an MP4 (Moving Picture Experts Group Audio Layer IV) player, a notebook computer or a desktop computer. The terminal 1900 can also be referred to as a user equipment, a portable terminal, a laptop terminal, a desktop terminal, and other names.
[0176] Generally, the terminal 1900 includes a processor 1901 and a memory 1902. The processor 1901 can include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 1901 can be implemented in the form of at least one of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), a PLA (Programmable Logic Array). The processor 1901 can also include a main processor and a coprocessor. The main processor is a processor for processing data in an awake state, also known as a CPU (Central Processing Unit). The coprocessor is a low-power processor for processing data in a standby state. In some embodiments, the processor 1901 can be integrated with a GPU (Graphics Processing Unit) that is responsible for rendering and drawing the content required to be displayed by the display screen. In some embodiments, the processor 1901 can further include an AI (Artificial Intelligence) processor for processing machine learning-related computing operations.
[0177] The memory 1902 can include one or more computer-readable storage media that can be non-transitory. The memory 1902 can also include a high-speed random access memory, and a nonvolatile memory such as one or more disk storage devices, flash storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 1902 is used to store at least one instruction for being executed by the processor 1901 to implement the observation picture processing method provided by the method embodiments in the present application.
[0178] In some embodiments, the terminal 1900 can also optionally include a peripheral device interface 1903 and at least one peripheral device. The processor 1901, the memory 1902, and the peripheral device interface 1903 can be connected through a bus or a signal line. Each peripheral device can be connected to the peripheral device interface 1903 through a bus, a signal line, or a circuit board. Specifically, the peripheral device includes at least one of a radio frequency circuit 1904, a touch display screen 1905, a camera assembly 1906, an audio circuit 1907, and a power supply 1908.
[0179] The peripheral interface 1903 can be used to connect at least one I / O (Input / Output) related peripheral device to the processor 1901 and the memory 1902. In some embodiments, the processor 1901, the memory 1902 and the peripheral interface 1903 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 1901, the memory 1902 and the peripheral interface 1903 can be implemented on a separate chip or circuit board, for which the present embodiments are not limited. The radio frequency circuit 1904 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The radio frequency circuit 1904 communicates with communication networks and other communication devices through electromagnetic signals. The radio frequency circuit 1904 can also include NFC (Near Field Communication) related circuitry. The touch display screen 1905 is used to display a UI (User Interface). The UI can include graphics, text, icons, video, and any combination thereof. The camera assembly 1906 is used to capture images or videos. Optionally, the camera assembly 1906 includes a front-facing camera and a rear-facing camera. The audio circuit 1907 can include a microphone and a speaker. The microphone is used to capture sound waves of a user and the environment, and convert the sound waves into electrical signals input to the processor 1901 for processing, or input to the radio frequency circuit 1904 to realize voice communication. The power supply 1908 is used to supply power to each component in the terminal 1900. The power supply 1908 can be alternating current, direct current, disposable batteries or rechargeable batteries.
[0180] In some embodiments, the terminal 1900 further includes one or more sensors 1909. The one or more sensors 1909 include, but are not limited to, an acceleration sensor 1910, a gyroscope sensor 1911, a pressure sensor 1912, an optical sensor 1913, and a proximity sensor 1914. The acceleration sensor 1910 can detect the acceleration in three coordinate axes of the coordinate system established by the terminal 1900. The pressure sensor 1912 can be disposed on the side frame of the terminal 1900 and / or the lower layer of the touch display screen 1905. The grip signal of the user on the terminal 1900 is detected, and / or the operable control on the UI interface is controlled according to the pressure operation of the user on the touch display screen 1905. The optical sensor 1913 is used to capture ambient light intensity. The proximity sensor 1914, also known as a distance sensor, is usually disposed on the front panel of the terminal 1900. The proximity sensor 1914 is used to capture the distance between the user and the front of the terminal 1900.
[0181] Those skilled in the art can understand that the above structure does not constitute a limitation on the terminal 1900, and can include more or fewer components than the illustration, or combine certain components, or adopt a different component arrangement.
[0182] In an example embodiment, a chip is also provided, which includes programmable logic circuit and / or program instructions, and when the chip is running on a computer device, is used to implement the observation picture processing method in the above aspects.
[0183] In an example embodiment, a computer program product is also provided, which includes computer instructions stored in a computer readable storage medium. A processor of a computer device reads the computer instructions from the computer readable storage medium, and the processor reads and executes the computer instructions from the computer readable storage medium to implement the observation picture processing method provided by the above method embodiments.
[0184] In an example embodiment, a computer readable storage medium is also provided, which stores a computer program, and the computer program is loaded and executed by a processor to implement the observation picture processing method provided by the above method embodiments.
[0185] Those of ordinary skill in the art can understand that all or part of the steps of the above embodiments can be completed by hardware, or can be instructed by a program to complete the related hardware, and the program can be stored in a computer readable storage medium. The storage medium mentioned above can be a read-only memory, a magnetic disk or an optical disk, etc.
[0186] Those of ordinary skill in the art should be aware that, in one or more examples described above, the functions described in the embodiments of the present application can be implemented in hardware, software, firmware or any combination thereof. When implemented in software, the functions can be stored in a computer readable medium or transmitted as one or more instructions or code on a computer readable medium. The computer readable medium includes computer storage medium and communication medium, and the communication medium includes any medium that facilitates the transfer of computer program from one place to another. The storage medium can be any available medium that can be accessed by a general or special purpose computer.
Claims
1. A processing method of an observation picture, the method being performed by a terminal, and the method comprising: displaying a first observation picture on a first screen in a first aspect ratio, the first observation picture being an observation result of a first region in a virtual environment, the first region having a first area in the virtual environment; and displaying a second observation picture on a second screen in a second aspect ratio, the second observation picture being an observation result of a second region in the virtual environment, the second region having a second area in the virtual environment; wherein a ratio between the first aspect ratio and the second aspect ratio is a first ratio, a ratio between the first area and the second area is a second ratio, the first ratio is greater than the second ratio, and the first screen and the second screen are different screens of a same terminal or different terminals.
2. The method of claim 1, wherein: the displaying the first observation picture on the first screen in the first aspect ratio includes: displaying the first observation picture on the first screen in the first aspect ratio, and obtaining the first observation picture by a virtual camera at a first height in the virtual environment; and the displaying the second observation picture on the second screen in the second aspect ratio includes: displaying the second observation picture on the second screen in the second aspect ratio, and obtaining the second observation picture by a virtual camera at a second height in the virtual environment; wherein the first aspect ratio is greater than the second aspect ratio, and the first height is less than the second height. the first region includes n sub-regions, the n sub-regions corresponding to n visual weights one by one, and a sum of the n visual weights is a first value; wherein an i-th visual weight in the n visual weights is negatively correlated with an i-th distance, the i-th distance being a distance between an i-th sub-region in the n sub-regions and a center point of the first region, n is an integer greater than 1, and i is a positive integer not greater than n. the second region includes m sub-regions, the m sub-regions corresponding to m visual weights one by one, and a sum of the m visual weights is a second value, a difference between the first value and the second value not exceeding a difference threshold; wherein a j-th visual weight in the m visual weights is negatively correlated with a j-th distance, the j-th distance being a distance between a j-th sub-region in the m sub-regions and a center point of the second region, m is an integer greater than 1, and j is a positive integer not greater than m. the method further comprising: determining s visual weights corresponding to s sub-regions in the virtual environment according to a weight association relationship, each visual weight in the s visual weights being a visual weight of a corresponding current sub-region relative to a center point of the candidate region, and s being an integer greater than or equal to n. 3. The method of claim 2, wherein, 4. The method of claim 3, wherein, 5. The method of claim 3, wherein, screening a target region from the candidate region, the candidate region including the s sub-regions, the candidate region having the first aspect ratio, the target region having a same center point as the candidate region, the target region having the first aspect ratio, and a sum of visual weights of each sub-region in the target region being the first value; determining that the virtual camera is located at the first height based on a size of the target region; wherein the weight correlation relationship indicates a negative correlation between the visual weight and the offset distance, the offset distance being a distance between the current sub-region corresponding to the visual weight and the center point of the candidate region.
6. The method of claim 5, wherein, The terminal displaying the first observation picture has a control authority or a spectating authority of a first virtual role in the virtual environment; the weight correlation relationship includes a first sub-relationship and a second sub-relationship. The determining the s visual weights corresponding to the s sub-regions in the virtual environment according to the weight correlation relationship includes: determining s1 visual weights corresponding to s1 sub-regions according to the first sub-relationship; determining s2 visual weights corresponding to s2 sub-regions according to the second sub-relationship; wherein the first sub-relationship indicates a negative correlation between the visual weight and the offset distance when the offset distance exceeds a distance threshold; the second sub-relationship indicates a negative correlation between the visual weight and the offset distance when the offset distance does not exceed the distance threshold; the distance threshold is a maximum observation distance of the first virtual role in the virtual environment, s is a sum of s1 and s2, and s1 and s2 are positive integers.
7. The method of claim 6, wherein, The s sub-regions include a first sub-region, a second sub-region, and a third sub-region; a first offset distance corresponding to the first sub-region and a second offset distance corresponding to the second sub-region both do not exceed the distance threshold, and a third offset distance corresponding to the third sub-region exceeds the distance threshold. wherein a difference between the first offset distance and the second offset distance is a first difference, a difference between the second offset distance and the third offset distance is a second difference, the first difference is equal to the second difference; a difference between a first visual weight corresponding to the first sub-region and a second visual weight corresponding to the second sub-region is a third difference, and a difference between the second visual weight corresponding to the second sub-region and a third visual weight corresponding to the third sub-region is a fourth difference, the third difference being less than the fourth difference.
8. The method according to any one of claims 1 to 7, wherein, The first aspect ratio and the second aspect ratio both do not belong to a preset aspect ratio range, the preset aspect ratio range being determined according to a preset screen aspect ratio and a tolerance parameter; the preset screen aspect ratio being an initial imaging aspect ratio of a virtual camera in a process of developing an application program providing the virtual environment.
9. The method of claim 8, wherein, The method further includes: when a third observation picture having a third aspect ratio is displayed on a third screen, the third observation picture being obtained by stretching a fourth observation picture having an aspect ratio of the preset screen aspect ratio to the third aspect ratio; The fourth observation picture is an observation picture of the virtual environment according to the initial imaging scale; and the third length-width scale belongs to the preset scale range.
10. The method of any one of claims 1 to 7, wherein, The virtual environment is provided by at least one of a multiplayer online battle arena (MOBA) game or a real-time strategy (RTS) game; and / or the first observation picture and the second observation picture are obtained in a top-down view of the virtual environment.
11. An observation picture processing apparatus, comprising: a display module configured to display a first observation picture in a first screen with a first length-width scale, the first observation picture being an observation result of a first region in a virtual environment, the first region having a first area in the virtual environment; the display module is further configured to display a second observation picture in a second screen with a second length-width scale, the second observation picture being an observation result of a second region in the virtual environment, the second region having a second area in the virtual environment; wherein a ratio between the first length-width scale and the second length-width scale is a first ratio, a ratio between the first area and the second area is a second ratio, the first ratio is greater than the second ratio; the first screen and the second screen are different screens of a same terminal, or the first screen and the second screen are different screens of different terminals.
12. A computer device comprising: a processor and a memory, the memory storing at least one program; the processor is configured to execute the at least one program in the memory to implement the observation picture processing method as claimed in any one of claims 1 to 10.
13. A computer readable storage medium, the readable storage medium storing executable instructions, the executable instructions being loaded and executed by a processor to implement the observation picture processing method as claimed in any one of claims 1 to 10.
14. A computer program product, the computer program product comprising computer instructions stored in a computer readable storage medium, the computer instructions being read and executed by a processor from the computer readable storage medium to implement the observation picture processing method as claimed in any one of claims 1 to 10.
Citation Information
Patent Citations
Depth residual network construction method for mobile phone screen defect detection
CN107123111A
Image size adaptation method and device
CN110209266A
Virtual environment picture display method and device, terminal and storage medium
CN111420402A
Application picture display method and device, terminal, screen projection system and medium
CN112905289A