Virtual scene display method and device, readable storage medium and electronic device
By switching the perspective and camera position in the virtual scene display method, the problems of low efficiency and poor smoothness of virtual scene switching are solved, and efficient and natural scene switching effects are achieved.
Patent Information
- Application Number
- CN202210575564.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-24
- Publication Date
- 2025-11-28
- Estimated Expiration
- 2042-05-24
AI Technical Summary
Existing technologies are inefficient and lack smoothness when switching between virtual scenes, requiring preprocessing and layering of the scene, resulting in unnatural transitions.
By switching between different perspectives in the graphical user interface, including first-person, second-person, and third-person perspectives, users can observe virtual planets and virtual terrain scenes using the camera. This avoids preprocessing and layering, and uses preset animations and camera position calculations for scene switching.
It improves the efficiency and smoothness of virtual scene switching, and enhances the intuitiveness and interactive efficiency of scene switching.
Smart Images

Figure CN114917582B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the technical field of virtual interaction, and in particular, to a virtual scene display method, a virtual scene display apparatus, a computer readable storage medium and an electronic device. BACKGROUND
[0002] Virtual scenes break through the limitations of the real world and are widely used in learning, life and work. Virtual scenes cannot be fully displayed in one interface and need to be switched to enter different virtual scenes. When switching, a smaller scene is switched to a larger scene, for example, a picture of a single virtual building is switched to a picture of a whole virtual city.
[0003] The current solution is to process scenes of different sizes according to height and display the scene at a certain height when the lens reaches the height. However, the scene needs to be preprocessed and layered, resulting in low efficiency and unnatural connection and low fluency when switching scenes.
[0004] It should be noted that the information disclosed in the above background section is only used to strengthen the understanding of the background of the present disclosure, and therefore can include information that does not constitute prior art known to those of ordinary skill in the art. SUMMARY
[0005] The purpose of the embodiments of the present disclosure is to provide a virtual scene display method, a virtual scene display apparatus, a computer readable storage medium and an electronic device. By switching the first perspective of the virtual planet scene, the second perspective of the virtual terrain scene and the third perspective of observing the virtual terrain scene based on the virtual character, the efficiency of scene switching is improved, and the fluency of scene switching is improved.
[0006] A first aspect of the embodiments of the present disclosure provides a virtual scene display method, which provides a graphical user interface through a terminal device, the graphical user interface including a virtual planet scene, the virtual planet scene including a first virtual terrain scene, the first virtual terrain scene including a virtual character controlled by a user through the terminal device, and the method including:
[0007] displaying a scene picture of a first perspective in the graphical user interface, the first perspective being a perspective of observing the whole virtual planet scene through a lens;
[0008] in response to a first operation, controlling the scene picture to be switched from the first perspective to a scene picture of a second perspective, the second perspective being a perspective of observing the whole first virtual terrain scene through a lens;
[0009] controlling the scene picture in the second view angle to switch to a scene picture in a third view angle, the third view angle being a view angle of the virtual character observing the first virtual terrain scene through the lens.
[0010] In an example embodiment of the present disclosure, before the step of controlling the scene picture in the first view angle to switch to the scene picture in the second view angle, the method further comprises:
[0011] obtaining a target position in the virtual star scene indicated by the lens switching operation, the target position being in a second virtual terrain scene;
[0012] calculating a rotation amount of the virtual star scene according to a current position of the virtual character in the first virtual terrain scene and the target position in the second virtual terrain scene;
[0013] controlling the virtual star scene to rotate based on the rotation amount.
[0014] In an example embodiment of the present disclosure, the first virtual terrain scene is located at a top of the star resource scene.
[0015] In an example embodiment of the present disclosure, the step of controlling the virtual star scene to rotate based on the rotation amount further comprises:
[0016] rotating the second virtual terrain scene where the target position is located to the top of the star resource scene.
[0017] In an example embodiment of the present disclosure, after the step of controlling the scene picture in the second view angle to switch to the third view angle, the method further comprises:
[0018] displaying a scene picture in the third view angle in the graphical user interface;
[0019] in response to a second operation, controlling the scene picture in the third view angle to switch to the scene picture in the second view angle;
[0020] controlling the scene picture in the second view angle to switch to the scene picture in the first view angle.
[0021] In an example embodiment of the present disclosure, the step of controlling the scene picture in the first view angle to switch to the scene picture in the second view angle comprises:
[0022] playing a preset animation to control the scene picture in the first view angle to switch to the scene picture in the second view angle.
[0023] In an example embodiment of the present disclosure, the step of controlling the scene picture in the second view angle to switch to the scene picture in the third view angle comprises:
[0024] acquire a position of a last frame of the scene picture of the second view angle corresponding to a lens, and acquire a current position of the virtual character;
[0025] According to the position of the corresponding lens and the current position, a switching lens picture required when switching display between the two positions is calculated;
[0026] The switching lens picture is constantly updated and displayed to control switching display from the scene picture of the second view angle to a scene picture of a third view angle.
[0027] According to a second aspect of the embodiments of the present disclosure, a virtual scene display device is provided, which provides a graphical user interface through a terminal device, the graphical user interface including a virtual star scene, the virtual star scene including a first virtual terrain scene, the first virtual terrain scene including a virtual character controlled by a user through the terminal device, and the device including:
[0028] A first view angle module is configured to display a scene picture of a first view angle in the graphical user interface, the first view angle being a view angle of observing the entire virtual star scene through a lens;
[0029] A second view angle module is configured to control switching display from the scene picture of the first view angle to a scene picture of a second view angle in response to a first operation, the second view angle being a view angle of observing the entire first virtual terrain scene through a lens;
[0030] A third view angle module is configured to control switching from the scene picture of the second view angle to a scene picture of a third view angle, the third view angle being a view angle of observing the first virtual terrain scene through a lens based on the virtual character.
[0031] In an exemplary embodiment of the present disclosure, the device further includes:
[0032] A star rotation module is configured to, before the step of controlling switching display from the scene picture of the first view angle to the scene picture of the second view angle,
[0033] Acquire a target position in the virtual star scene indicated by the lens switching operation, the target position being in a second virtual terrain scene;
[0034] According to the current position of the virtual character in the first virtual terrain scene and the target position in the second virtual terrain scene, a rotation amount of the virtual star scene is calculated;
[0035] The virtual star scene is controlled to rotate based on the rotation amount.
[0036] In an example embodiment of the present disclosure, the first virtual terrain scene is located on top of the planet resource scene.
[0037] In an example embodiment of the present disclosure, the second view angle module is configured to rotate a second virtual terrain scene in which the target position is located to the top of the planet resource scene.
[0038] In an example embodiment of the present disclosure, the device further comprises:
[0039] The reverse switching module is configured to display a third view angle scene picture in the graphical user interface after the step of controlling the scene picture in the second view angle to switch to the third view angle.
[0040] In response to a second operation, the third view angle scene picture is controlled to switch to display the second view angle scene picture.
[0041] The second view angle scene picture is controlled to switch to display the first view angle scene picture.
[0042] In an example embodiment of the present disclosure, the second view angle module is configured to play a preset animation to switch the first view angle scene picture to display the second view angle scene picture.
[0043] In an example embodiment of the present disclosure, the third view angle module is configured to obtain a position of a corresponding shot of a last frame of the second view angle scene picture, and obtain a current position of the virtual character.
[0044] According to the corresponding shot position and the current position, a switching shot picture required when switching display between the two positions is calculated.
[0045] The switching shot picture is updated to control the second view angle scene picture to switch to display the third view angle scene picture.
[0046] According to a third aspect of the embodiments of the present disclosure, a computer readable storage medium is provided, which stores a computer program. The program is executed by a processor to implement the virtual scene display method according to the first aspect of the above embodiments.
[0047] According to a fourth aspect of the embodiments of the present disclosure, an electronic device is provided, which comprises one or more processors, and a storage device configured to store one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the virtual scene display method according to the first aspect of the above embodiments.
[0048] According to a fifth aspect of the present disclosure, a computer program product or computer program is 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 executes the computer instructions to cause the computer device to perform the method provided in the various optional implementations described above.
[0049] The technical solutions provided by the embodiments of the present disclosure can include the following beneficial effects:
[0050] In the technical solutions provided by some embodiments of the present disclosure, the scene picture of the first perspective can be displayed in the graphical user interface, the first perspective being a perspective for observing the virtual star scene; in response to a first operation, the scene picture of the first perspective is controlled to be switched and displayed to the scene picture of the second perspective, the second perspective being a perspective for observing the entire first virtual terrain scene; the scene picture of the second perspective is controlled to be switched and displayed to the scene picture of the third perspective, the third perspective being a perspective for observing the first virtual terrain scene based on the virtual character. By implementing the embodiments of the present disclosure, on the one hand, different virtual scenes are switched by changing the perspective of the lens, which avoids the need for preprocessing and layering different scenes, and improves the efficiency of scene switching; on the other hand, the perspective is switched by the lens, which improves the fluency of switching different scenes; on the other hand, by setting the star model and the virtual terrain scene, the real map switching can be simulated, and the intuitiveness and interaction efficiency of scene switching are improved.
[0051] It should be understood that the foregoing general description and the following detailed description are only exemplary and explanatory, and cannot limit the present disclosure. BRIEF DESCRIPTION OF DRAWINGS
[0052] The drawings incorporated into the specification and forming a part of the specification, show embodiments consistent with the present disclosure, and together with the specification, serve to explain the principles of the present disclosure. Obviously, the drawings in the following description are only some embodiments of the present disclosure, and other drawings can be obtained by those skilled in the art without creative labor.
[0053] Figure 1 The schematic diagram shows an exemplary terminal device of a virtual scene display method and a virtual scene display device to which the embodiments of the present disclosure can be applied;
[0054] Figure 2 The schematic diagram shows a flowchart of a virtual scene display method according to an embodiment of the present disclosure;
[0055] Figure 3 The schematic diagram shows a virtual star model according to an embodiment of the present disclosure;
[0056] Figure 4 Fig. 12 schematically illustrates a structure diagram of rotating according to a target position and a current position according to an embodiment of the present disclosure;
[0057] Figure 5A Fig. 13 schematically illustrates a flow diagram of a first view to a third view according to an embodiment of the present disclosure;
[0058] Figure 5B Fig. 14 schematically illustrates a flow diagram of a third view to a first view according to an embodiment of the present disclosure;
[0059] Figure 6 Fig. 15 schematically illustrates a structure block diagram of a virtual scene display device according to an embodiment of the present disclosure;
[0060] Figure 7 Fig. 16 schematically illustrates a structure diagram of a computer system of a terminal device suitable for implementing an embodiment of the present disclosure. DETAILED DESCRIPTION
[0061] Example implementations will now be described more fully with reference to the accompanying drawings. Example implementations can be implemented in any
[0062] Moreover, the drawings are not necessarily to scale. Like reference numerals can be used to denote like parts throughout the specification. The most significant two digits of a reference number generally indicate the figure in which that component first appears. Some embodiments can be used in conjunction with various devices and systems. For example, some embodiments can be used in a computer system having a display. Some of the embodiments can be used in conjunction with computer system environments such as those provided by Apple Computer, Inc. of Cupertino, California (e.g., the Mac OS X environment). However, this description is not intended to be limited to computer systems and environments. Other embodiments can be used in different computer system environments, or in non-computer system environments. Some embodiments can be used in conjunction with a mobile device such as a mobile telephone, smart phone, tablet, or other mobile devices. Some embodiments can be used in conjunction with a computer system or other computing device operating one or more operating systems or architectures, such as one or more of Windows, Mac OS, UNIX, or Linux operating systems. Some embodiments can be used in conjunction with one or more "virtual appliances" or "virtual machines." Some embodiments can be used in conjunction with a mobile computing environment such as an iPhone or iPod Touch mobile computing device from Apple Inc. of Cupertino, California. Other embodiments can be used in connection with other computing devices such as portable digital assistants, media players, gaming devices, and other devices.
[0063] Figure 1 Fig. 16 schematically illustrates a structure diagram of an exemplary terminal device of a virtual scene display method and a virtual scene display device to which an embodiment of the present disclosure can be applied.
[0064] As shown in Figure 1 The terminal device can include one or more of terminal devices 101, 102, and 103. The terminal devices 101, 102, and 103 can be various electronic devices with a display screen, including but not limited to desktop computers, portable computers, smart phones, and tablet computers, and the like.
[0065] The virtual scene display method in one embodiment of the present disclosure can run on a local terminal device or a server. When the virtual scene display method runs on the server, the method can be implemented and executed based on a cloud interaction system, where the cloud interaction system includes a server and a client device.
[0066] In an optional implementation, various cloud applications can run under the cloud interaction system, for example, cloud games. Taking cloud games as an example, cloud games refer to a game mode based on cloud computing. In the running mode of cloud games, the running subject of the game program and the presentation subject of the game picture are separated, and the storage and running of the control method of the game interface are completed on the cloud game server. The client device is used for receiving and sending data and presenting the game picture. For example, the client device can be a display device close to the user side with data transmission function, such as a mobile terminal, a television, a computer, a palm computer, etc. However, the cloud game server in the cloud end performs information processing. When playing the game, the player operates the client device to send operation instructions to the cloud game server, the cloud game server runs the game according to the operation instructions, encodes and compresses the game picture and other data, returns the data to the client device through the network, and finally decodes and outputs the game picture through the client device.
[0067] In an optional implementation, taking games as an example, the local terminal device stores a game program and is used for presenting a game picture. The local terminal device is used for interacting with the player through a graphical user interface, that is, the conventional game program is downloaded and installed on the terminal device and is run. The way in which the local terminal device provides the graphical user interface to the player can include various ways, for example, the graphical user interface can be rendered and displayed on the display screen of the terminal, or the graphical user interface can be provided to the player through holographic projection. For example, the local terminal device can include a display screen and a processor, the display screen is used for presenting a graphical user interface including a game picture, and the processor is used for running the game, generating the graphical user interface, and controlling the display of the graphical user interface on the display screen.
[0068] It should be noted that the computer-readable storage medium shown in the disclosure can be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may, for example, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or component, or any combination of the above. More specific examples of computer-readable storage media can include, but are not limited to, an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the disclosure, the computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, device or component. In the disclosure, the computer-readable signal medium can include a data signal propagating in a baseband or as a carrier wave part of a carrier wave, which carries computer-readable program code. Such a propagating data signal can take various forms, including but not limited to electromagnetic signals, optical signals or any suitable combination of the above. The computer-readable signal medium can also be any computer-readable storage medium other than the computer-readable storage medium, which can send, propagate or transmit a program for use by or in conjunction with an instruction execution system, device or component. The program code contained on the computer-readable storage medium can be transmitted by any suitable medium, including but not limited to wireless, wire, optical cable, etc., or any suitable combination of the above.
[0069] The flowcharts and block diagrams in the drawings illustrate the possible implementation architectures, functions and operations of the systems, methods and computer program products according to various embodiments of the disclosure. In this regard, each block in the flowchart or block diagram can represent a module, a program segment or a part of code containing one or more executable instructions for implementing the specified logical functions. It should also be noted that in some alternative implementations, the functions noted in the blocks can occur in different order than that shown in the drawings. For example, two blocks represented in succession can actually be executed substantially in parallel, and sometimes in reverse order, depending on the functions involved. It should also be noted that each block in the block diagram or flowchart, and the combination of blocks in the block diagram or flowchart, can be implemented by a dedicated hardware-based system for performing the specified functions or operations, or can be implemented by a combination of dedicated hardware and computer instructions.
[0070] The units described in the embodiments of the present disclosure can be implemented in the form of software, or can be implemented in the form of hardware, or can be implemented in the form of an assembly of software and hardware. In some cases, the names of the units do not constitute a limitation on the units themselves.
[0071] As another aspect, the present disclosure also provides a computer-readable storage medium, which can be included in the terminal device described in the above embodiments, or can exist independently without being assembled into the terminal device. The computer-readable storage medium carries one or more programs, and when the one or more programs are executed by the terminal device, the terminal device implements the method described in the above embodiments. For example, the terminal device can implement the steps shown in Figure 2
[0072] The present disclosure can be applied to virtual map applications, games, and the like.
[0073] The present example embodiment provides a virtual scene display method, which refers to Figure 2 The present example embodiment provides a virtual scene display method, which refers to
[0074] In step S210, a scene picture of a first view is displayed in the graphical user interface, the first view being a view of observing the entire virtual star scene through a lens.
[0075] In step S220, in response to a first operation, a scene picture of a second view is displayed by switching from the scene picture of the first view, the second view being a view of observing the entire first virtual terrain scene through a lens.
[0076] In step S230, a scene picture of a third view is displayed by switching from the scene picture of the second view, the third view being a view of observing the first virtual terrain scene through a lens based on the virtual character.
[0077] The present example embodiment provides a virtual scene display method, which refers to Figure 2 The virtual scene display method shown can display a scene picture of a first perspective in a graphical user interface; in response to a first operation, control switching display from the scene picture of the first perspective to a scene picture of a second perspective; control switching display from the scene picture of the second perspective to a scene picture of a third perspective. By changing different perspectives by moving a lens to switch different virtual scenes, the embodiment of the present disclosure avoids the need for preprocessing and layering different scenes, improving the efficiency of scene switching; on the other hand, by switching perspectives by the lens, the embodiment of the present disclosure improves the fluency of switching different scenes; on the other hand, by setting a star model and a virtual terrain scene, the embodiment of the present disclosure can simulate real map switching, improving the intuitiveness and interaction efficiency of scene switching.
[0078] Next, the above steps of the present example embodiment are described in more detail.
[0079] In step S210, a scene picture of a first perspective is displayed in the graphical user interface, the first perspective being a perspective of observing the entire virtual star scene through a lens.
[0080] The virtual star scene is a display of the entire virtual scene, and the virtual star scene can display different virtual terrain scenes, which are more specific scenes relative to the star scene. For example, the virtual terrain scene can be a virtual city scene or a virtual mountain scene, etc., and the virtual terrain scene is a scene in which a virtual character controlled by a user performs activities. For example, the virtual star scene can be as shown in FIG. 1. Figure 3 As shown, it is a spherical model.
[0081] The virtual lens observes the entire virtual star scene, which determines a position of a lens, and a three-dimensional scene is projected and calculated at the position to display the three-dimensional virtual scene in two dimensions on the graphical user interface to form a virtual lens or camera shooting. When the entire virtual star scene needs to be displayed comprehensively, the position of the lens needs to be at a position far from the star, and the three-dimensional star scene is projected and calculated at the position to obtain a star scene picture corresponding to the lens position.
[0082] In step S220, in response to a first operation, a scene picture of a second perspective is displayed by switching display from a scene picture of a first perspective, the second perspective being a perspective of observing the entire first virtual terrain scene through a lens.
[0083] In the embodiments of the present disclosure, the first operation can be a scroll wheel operation of a mouse, a key operation on a keyboard, or a double-click operation or a double-finger open operation applied to a touchable display screen of a mobile terminal, and the present disclosure does not limit the manner of the first operation. The entire first virtual terrain scene can refer to a virtual scene obtained by overlooking the virtual scene from the sky. For example, it can be a virtual city scene capable of fully displaying the picture of the entire city building and street, or a virtual mountain scene capable of fully displaying the picture of each peak.
[0084] Switching the scene picture from the first perspective to the scene picture from the second perspective can be completed through a preset scene animation. For example, a transition animation can be generated through part of the scene picture from the first perspective and part of the scene picture from the second perspective to link the switching from the first perspective to the second perspective.
[0085] It can be understood that, since the virtual terrain scene is not infinite, there is an undeveloped edge. Therefore, when switching to the second perspective, a high fog can be added to the edge of the virtual terrain scene to simulate the real cloud effect at a high altitude and shield the edge of the terrain scene.
[0086] In step S230, the scene picture from the second perspective is switched to the scene picture from a third perspective, and the third perspective is a perspective of the virtual character observing the first virtual terrain scene through a lens.
[0087] In the embodiments of the present disclosure, the perspective of the virtual character observing the first virtual terrain scene through the lens can be a first-person perspective or a third-person perspective of the virtual character. The first-person perspective can be to place the lens on the head or shoulder of the virtual character to shoot the virtual terrain scene, and in the first-person perspective, the virtual character itself is generally not displayed, but the limbs or body of the virtual character can be displayed as the lens rotates; the third-person perspective can be to place the lens above the back of the virtual character, and the third-person perspective can shoot the upper body or the whole body of the virtual character.
[0088] In the entire virtual planet scene, a plurality of different virtual terrain scenes can be included, and the virtual character controlled by the user through the terminal device can only be in one virtual terrain scene. When the scene is switched, the virtual terrain scene to be switched to can not be a different position from the virtual terrain scene of the virtual character.
[0089] Based on this, in the embodiments of the present disclosure, an implementation manner of a virtual scene display method is also provided. Before the step of controlling the switching of the scene picture from the first perspective to the scene picture from the second perspective, the method further includes:
[0090] acquire a target position in the virtual star scene of the first operation indication, the target position being in a second virtual terrain scene;
[0091] calculate a rotation amount of the virtual star scene according to a current position of the virtual character in the first virtual terrain scene and the target position in the second virtual terrain scene;
[0092] control the virtual star scene to rotate based on the rotation amount.
[0093] In the embodiments of the present disclosure, a position of an operation indication is acquired in response to a first operation. As mentioned above, the position can be a click point of a mouse on a graphical user interface, or a touch point of a user on a touch screen of a mobile terminal, and the like. A point on a star model that is clicked is determined according to the click or touch position, and then a corresponding position of the clicked point in a two-dimensional plane map is calculated based on a mapping relationship between the virtual star map and the plane map by the following formula:
[0094] Pos B′ = UV x Size 地形 + Pos 地形
[0095] According to the corresponding position in the two-dimensional plane map calculated above, a point on the star model corresponding to the position is calculated by a ray tool, that is, a target position in the virtual star scene of the first operation indication. Specifically, the two-dimensional plane map can be overlaid above the star model by using a ray tool in Unreal Engine (UE), the corresponding position in the two-dimensional plane map is taken as a starting point of a ray, and a direction from the starting point of the ray to a center of the star model is taken as a direction of the ray, so as to make the ray. The ray will intersect with the spherical surface, and an intersection point is the target position in the virtual star scene indicated.
[0096] Based on the determined target point (B) and the current point (C), a coordinate system as shown in FIG. 3 is established at the center of the virtual star model, a vector Figure 4 is first acquired, and a vector is also acquired. The two vectors are then normalized.
[0097] Then, the cross product of the two vectors is calculated by the following formula: and to obtain a rotation axis
[0098]
[0099] The included angle between the two vectors is calculated by the following formula:
[0100]
[0101] Finally, according to the calculation result, the axis The rotation angle θ.
[0102] In the embodiments of the present disclosure, an implementation manner of a virtual scene display method is also provided. A first virtual terrain scene in which a current position is located is placed on the top of a virtual star scene, and the first virtual terrain scene is tangent to the top of the virtual star scene. The scene that a user wants to switch can be always displayed on the top of the star scene. Therefore, before the star scene is rotated, the first virtual terrain scene is on the top of the star scene, and when the star scene is rotated, a second virtual terrain scene in which a target position is located is rotated to the top of the star scene, and after the star scene is rotated, the second virtual terrain scene is on the top of the star scene.
[0103] In the use scenario of scene switching, a user will switch scenes multiple times. For example, the scene can be switched from A to B first, and then from B to C again, in this process, the scene needs to be switched from the star scene to the virtual terrain scene, and then from the virtual terrain scene to the star scene, so that the user can have a comprehensive understanding of the scene.
[0104] Based on this, in the embodiments of the present disclosure, an implementation manner of a virtual scene display method is also provided. After the step of controlling the scene picture of the second view angle to switch to the third view angle, the method further includes:
[0105] displaying the scene picture of the third view angle in the graphical user interface;
[0106] in response to a second operation, controlling the scene picture to switch from the third view angle to the scene picture of the second view angle for display;
[0107] controlling the scene picture to switch from the second view angle to the scene picture of the first view angle for display.
[0108] The steps of the embodiments of the present disclosure are the switching process opposite to the foregoing steps, and the embodiments of the present disclosure will not be described herein.
[0109] In real time, the embodiments of the present disclosure can switch back to the first view angle after the first view angle is gradually switched to the third view angle. The intuitive degree of scene display and the interaction efficiency can be improved when the user interacts with different scenes.
[0110] In the embodiments of the present disclosure, an implementation manner of a virtual scene display method is also provided.
[0111] The step of controlling the scene picture to switch from the second view angle to the scene picture of the third view angle includes:
[0112] obtaining the position of the last frame of the scene picture of the second view angle corresponding to the lens, and obtaining the current position of the virtual role.
[0113] According to the position of the corresponding lens and the current position, a switching lens picture required when switching display between the two positions is calculated;
[0114] The switching lens picture is updated and displayed to control switching display from the scene picture of the second view angle to the scene picture of the third view angle.
[0115] In the embodiments of the present disclosure, in the process of switching from the second view angle to the third view angle, since the switching of the view angle is a process of continuous change of the lens, when the second view angle is switched to the third view angle, the position of the corresponding lens of the last frame of the scene picture of the second view angle is acquired first, and the current position of the virtual character is determined. Since the switching of the view angle is a process of change of the lens position, based on the first and last positions of the view angle switching process, when the second view angle is switched to the third view angle, the position of the lens is continuously updated, and the updated intermediate scene picture is acquired according to the continuously updated lens position.
[0116] It can be understood that according to different requirements, the number of times of updating the scene picture when switching can be different. For example, if the number of times of updating the scene picture is 50, then in the process of switching, 50 lens positions need to be acquired, and the corresponding scene pictures are determined according to the positions to constitute the process of switching from the second view angle to the third view angle.
[0117] In summary, the flow of the above-mentioned embodiments is described. As shown in Figure 5A When switching from the virtual star scene to the virtual terrain scene where the virtual character is located, the target point is determined and the star is rotated to the target point according to the operation of clicking the star first, then the scene animation is played to switch the first view angle to the second view angle, and finally the third view angle based on the virtual character observing the virtual terrain scene is switched from the second view angle. As shown in Figure 5B When switching from the virtual terrain scene where the virtual character is located to the virtual star scene, the third view angle of observing the virtual terrain scene from the virtual character is switched to the second view angle of observing the entire virtual terrain scene in response to the second operation, and then the scene animation is played in reverse to switch to the first view angle. Since no new target point is determined when switching from the third view angle to the first view angle, the step of rotating the star is not required.
[0118] Further, in the example embodiment, a virtual scene display device is also provided, which provides a graphical user interface through a terminal device, the graphical user interface includes a virtual star scene, the virtual star scene includes a first virtual terrain scene, the first virtual terrain scene includes a virtual character controlled by a user through the terminal device, and the device 600 includes:
[0119] The first perspective module 601 is configured to display a scene picture of a first perspective in the graphical user interface, the first perspective being a perspective of observing the entire virtual planet scene through a lens.
[0120] The second perspective module 602 is configured to, in response to a first operation, control switching display from the scene picture of the first perspective to a scene picture of a second perspective, the second perspective being a perspective of observing the entire first virtual terrain scene through the lens.
[0121] The third perspective module 603 is configured to control switching from the scene picture of the second perspective to a scene picture of a third perspective, the third perspective being a perspective of observing the first virtual terrain scene through the lens by the virtual character.
[0122] In an example embodiment of the present disclosure, the device further comprises:
[0123] A planet rotation module is configured to, before the step of controlling switching display from the scene picture of the first perspective to the scene picture of the second perspective,
[0124] acquire a target position in the virtual planet scene indicated by the lens switching operation, the target position being located in a second virtual terrain scene;
[0125] According to the current position of the virtual character in the first virtual terrain scene and the target position in the second virtual terrain scene, calculate a rotation amount of the virtual planet scene;
[0126] Control the virtual planet scene to rotate based on the rotation amount.
[0127] In an example embodiment of the present disclosure, the first virtual terrain scene is located at the top of the planet resource scene.
[0128] In an example embodiment of the present disclosure, the second perspective module is configured to rotate the second virtual terrain scene where the target position is located to the top of the planet resource scene.
[0129] In an example embodiment of the present disclosure, the device further comprises:
[0130] A reverse switching module is configured to, after the step of controlling switching from the scene picture of the second perspective to the third perspective, display a scene picture of a third perspective in the graphical user interface;
[0131] In response to a second operation, control switching display from the scene picture of the third perspective to the scene picture of the second perspective;
[0132] Control switching display from the scene picture of the second perspective to the scene picture of the first perspective.
[0133] In an example embodiment of the present disclosure, the second view module is configured to play a preset animation to switch from the scene picture in the first view to the scene picture in the second view.
[0134] In an example embodiment of the present disclosure, the third view module is configured to acquire a position of a corresponding shot of a last frame of the scene picture in the second view, and acquire a current position of the virtual character;
[0135] According to the corresponding shot position and the current position, a switching shot picture required when switching between the two positions is calculated;
[0136] The switching shot picture is updated to control switching from the scene picture in the second view to the scene picture in the third view.
[0137] Figure 7 A structural schematic diagram of a computer system of a terminal device suitable for implementing the embodiments of the present disclosure is shown.
[0138] It should be noted that, Figure 7 The computer system of the terminal device shown is only an example, and should not impose any limitation on the functions and use range of the embodiments of the present disclosure.
[0139] As Figure 7 shown, the computer system includes a central processing unit (CPU) which can perform various appropriate actions and processes according to programs stored in a read-only memory (ROM) or loaded from a storage portion into a random access memory (RAM) 203. Various programs and data required for system operation are also stored in the (RAM). The (CPU), the (ROM), and the (RAM) are connected to each other through a bus. An input / output (I / O) interface is also connected to the bus.
[0140] The following components are connected to the (I / O) interface: an input portion including a keyboard, a mouse, and the like; an output portion including a cathode ray tube (CRT), a liquid crystal display (LCD), and the like, and a speaker, and the like; a storage portion including a hard disk, and the like; and a communication portion including a network interface card such as a LAN card, a modem, and the like. The communication portion performs communication processing via a network such as the Internet. A drive is also connected to the (I / O) interface as necessary. A removable medium such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, and the like is mounted on the drive as necessary, so that a computer program read therefrom is installed in the storage portion as necessary.
[0141] In particular, according to embodiments of the present disclosure, the processes described above with reference to the flowcharts can be implemented as a computer software program. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a computer-readable storage medium, the computer program containing program code for executing the methods illustrated by the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network by a communication section, and / or installed from a detachable medium. When the computer program is executed by a central processing unit (CPU), various functions defined in the methods and apparatuses of the present disclosure are executed. It should be noted that although several modules or units of the apparatus for action execution are mentioned in the above detailed description, such division is not mandatory. In fact, according to embodiments of the present disclosure, features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, features and functions of one module or unit described above can be further divided into embodied by multiple modules or units.
[0142] Since the various functional modules of the virtual scene display apparatus of the example embodiments of the present disclosure correspond to the steps of the example embodiments of the virtual scene display method described above, for details and effects not disclosed in the apparatus embodiments of the present disclosure, please refer to the above-described example embodiments of the virtual scene display method of the present disclosure.
[0143] The above modules can be one or more integrated circuits configured to implement the above methods, such as one or more application specific integrated circuits (ASICs), or one or more digital signal processors (DSPs), or one or more field programmable gate arrays (FPGAs), etc. For another example, when a certain module above is implemented in the form of a processing element scheduling program code, the processing element can be a general purpose processor, such as a central processing unit (CPU) or other processor that can invoke program code. For another example, the modules can be integrated together to implement in the form of a system on a chip (SOC).
[0144] In the embodiments of the present disclosure, it should be understood that the disclosed apparatus and method can be implemented in other manners. For example, the described apparatus embodiments are merely schematic. The division of the units is merely logical function division. There can be another division manner in actual implementation. For example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the displayed or discussed mutual couplings or direct couplings or communication connections can be indirect couplings or communication connections through some interfaces, devices or units, and can be in electrical, mechanical or other forms.
[0145] The units described as separate components can or can not be physically separate, and the components shown as units can or can not be physical units, i.e., can be located in one place, or can be distributed on a plurality of network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiments.
[0146] In addition, each functional unit in the various embodiments of the present application can be integrated in one processing unit, or each unit can be a physically independent unit, or two or more units can be integrated in one unit. The integrated unit can be implemented in the form of hardware, or in the form of hardware plus software function unit.
[0147] The integrated unit implemented in the form of software function unit can be stored in a computer readable storage medium. The software function unit stored in the storage medium includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor (English: processor) to execute part of the steps of the method described in the various embodiments of the present application.
[0148] The above is merely specific implementation of the present application, but the protection scope of the present application is not limited thereto, any person skilled in the art can easily think of changes or replacements within the technical scope disclosed in the present application, which should be covered in the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A method for displaying a virtual scene, characterized in that, A graphical user interface (GUI) is provided via a terminal device. The GUI includes a virtual planet scene, which includes a first virtual terrain scene located at the top of the virtual planet scene. The first virtual terrain scene includes a virtual character controlled by the user through the terminal device. The method includes: The graphical user interface displays a scene view from a first perspective, which is the view of observing the entire virtual planet scene through a camera lens. In response to the first operation, control the switching of the scene display from the first perspective to the second perspective, which is the perspective of observing the entire first virtual terrain scene through the camera; The system controls the switching of the scene view from the second perspective to the third perspective, which is based on the perspective of the virtual character observing the first virtual terrain scene through the camera.
2. The method according to claim 1, characterized in that, Before the step of controlling the switching of the scene view from the first perspective to the second perspective, the method further includes: Acquire a target location in the virtual planet scene where the camera switching operation instruction is received, the target location being located in a second virtual terrain scene; The rotation amount of the virtual planet scene is calculated based on the current position of the virtual character in the first virtual terrain scene and the target position in the second virtual terrain scene; The rotation of the virtual planet scene is controlled based on the rotation amount.
3. The method according to claim 1, characterized in that, The top of the first virtual terrain scene is tangent to the top of the virtual planet scene.
4. The method according to claim 2, characterized in that, The step of controlling the rotation of the virtual planet scene based on the rotation amount further includes: Rotate the second virtual terrain scene where the target location is located to the top of the virtual planet scene.
5. The method according to claim 1, characterized in that, After the step of switching the scene view from the second perspective to the third perspective, the method further includes: The graphical user interface displays a scene from a third-person perspective; In response to the second operation, control the switching of the scene view from the third-person perspective to the second-person perspective; Controls the switching between second-person and first-person perspective scene views.
6. The method according to claim 1, characterized in that, The step of controlling the switching of the scene view from the first perspective to the second perspective includes: Play a preset animation to switch the scene view from a first-person perspective to a second-person perspective.
7. The method according to claim 1, characterized in that, The step of controlling the switching of the scene view from the second perspective to the third perspective includes: Obtain the position of the camera corresponding to the last frame of the scene from the second perspective, and obtain the current position of the virtual character; Based on the position of the corresponding lens and the current position, calculate the switching lens screen required when switching the display between the two positions; The updated display shows the switching camera view to control the switching from the second-view scene view to the third-view scene view.
8. A virtual scene display device, characterized in that, A graphical user interface (GUI) is provided via a terminal device. The GUI includes a virtual planet scene, which includes a first virtual terrain scene located at the top of the virtual planet scene. The first virtual terrain scene includes a virtual character controlled by the user through the terminal device. The device includes: The first-view module is used to display the scene from the first perspective in the graphical user interface. The first perspective is the view of observing the entire virtual planet scene through the lens. The second perspective module is used to respond to the first operation and control the switching of the scene display from the first perspective to the second perspective. The second perspective is the viewpoint of observing the entire first virtual terrain scene through the camera. The third-view module is used to control the switching from the second-view scene to the third-view scene, which is based on the perspective of the virtual character observing the first virtual terrain scene through the camera.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the virtual scene display method as described in any one of claims 1 to 7.
10. An electronic device, characterized in that, include: One or more processors; A storage device for storing one or more programs, which, when executed by one or more processors, cause the one or more processors to implement the virtual scene display method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Game scene switching method and device, computer equipment and storage medium
CN113101650A
Virtual map display method and device, equipment and storage medium
CN113599809A
Game scene control method and device, computer equipment and storage medium
CN114504819A