WO2022156639A1 - 虚拟场景显示方法、装置、设备、存储介质及程序产品 - Google Patents

虚拟场景显示方法、装置、设备、存储介质及程序产品 Download PDF

Info

Publication number
WO2022156639A1
WO2022156639A1 PCT/CN2022/072363 CN2022072363W WO2022156639A1 WO 2022156639 A1 WO2022156639 A1 WO 2022156639A1 CN 2022072363 W CN2022072363 W CN 2022072363W WO 2022156639 A1 WO2022156639 A1 WO 2022156639A1
Authority
WO
WIPO (PCT)
Prior art keywords
virtual scene
scene
virtual
height
representation
Prior art date
Application number
PCT/CN2022/072363
Other languages
English (en)
French (fr)
Inventor
周照友
Original Assignee
腾讯科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 腾讯科技(深圳)有限公司 filed Critical 腾讯科技(深圳)有限公司
Priority to EP22742118.7A priority Critical patent/EP4180099A4/en
Priority to KR1020237020044A priority patent/KR20230104967A/ko
Publication of WO2022156639A1 publication Critical patent/WO2022156639A1/zh
Priority to US17/975,516 priority patent/US20230048826A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T19/00Manipulating 3D models or images for computer graphics
    • G06T19/20Editing of 3D images, e.g. changing shapes or colours, aligning objects or positioning parts
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/40Processing input control signals of video game devices, e.g. signals generated by the player or derived from the environment
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/74Image or video pattern matching; Proximity measures in feature spaces
    • G06V10/761Proximity, similarity or dissimilarity measures
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/50Controlling the output signals based on the game progress
    • A63F13/52Controlling the output signals based on the game progress involving aspects of the displayed game scene
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/50Controlling the output signals based on the game progress
    • A63F13/52Controlling the output signals based on the game progress involving aspects of the displayed game scene
    • A63F13/525Changing parameters of virtual cameras
    • A63F13/5255Changing parameters of virtual cameras according to dedicated instructions from a player, e.g. using a secondary joystick to rotate the camera around a player's character
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/70Game security or game management aspects
    • A63F13/77Game security or game management aspects involving data related to game devices or game servers, e.g. configuration data, software version or amount of memory
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • G06F3/04815Interaction with a metaphor-based environment or interaction object displayed as three-dimensional, e.g. changing the user viewpoint with respect to the environment or object
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/10Geometric effects
    • G06T15/20Perspective computation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T19/00Manipulating 3D models or images for computer graphics
    • G06T19/003Navigation within 3D models or images
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/20Movements or behaviour, e.g. gesture recognition
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F2300/00Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game
    • A63F2300/60Methods for processing data by generating or executing the game program
    • A63F2300/66Methods for processing data by generating or executing the game program for rendering three dimensional images
    • A63F2300/6661Methods for processing data by generating or executing the game program for rendering three dimensional images for changing the position of the virtual camera
    • A63F2300/6676Methods for processing data by generating or executing the game program for rendering three dimensional images for changing the position of the virtual camera by dedicated player input
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F2300/00Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game
    • A63F2300/80Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game specially adapted for executing a specific type of game
    • A63F2300/807Role playing or strategy games
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2219/00Indexing scheme for manipulating 3D models or images for computer graphics
    • G06T2219/20Indexing scheme for editing of 3D models
    • G06T2219/2016Rotation, translation, scaling

Definitions

  • the present application relates to the technical field of virtual scenes, and in particular, to a method, apparatus, device, storage medium and program product for displaying a virtual scene.
  • a game client that supports both 2D representation and 3D representation can provide a 2D/3D setting function.
  • the user Before entering the game scene, the user can set the representation of the game scene through this setting function.
  • the representation form of the game scene is set as a 3-dimensional representation form.
  • the game client After subsequent users enter the game scene, the game client will display the 3-dimensional game scene.
  • Embodiments of the present application provide a virtual scene display method, apparatus, device, storage medium, and program product.
  • the technical solution is as follows:
  • the embodiment of the present application provides a virtual scene display method, the method includes:
  • a first scene picture of the virtual scene is displayed in a first representation form;
  • the first representation form is a two-dimensional representation form or a three-dimensional representation form;
  • a second scene picture of the virtual scene is displayed in a second representation; the second representation is a two-dimensional representation and a three-dimensional representation
  • the expression form another expression form other than the first expression form.
  • an embodiment of the present application provides a virtual scene display device, and the device includes:
  • an interface display module used for displaying a virtual scene interface, where the virtual scene interface is used for displaying a scene picture of the virtual scene;
  • a first picture display module configured to display the first scene picture of the virtual scene in a first representation form in the virtual scene interface;
  • the first representation form is a two-dimensional representation form or a three-dimensional representation form;
  • a second picture display module configured to display a second scene picture of the virtual scene in a second representation form in the virtual scene interface in response to receiving the zoom operation on the virtual scene;
  • the second representation A form is another form of expression other than the first form of expression among the two-dimensional form of expression and the three-dimensional form of expression.
  • the second picture display module includes:
  • an information acquisition sub-module configured to acquire the height change information of the virtual camera before and after the zoom operation in response to receiving the zoom operation;
  • the virtual camera is used to collect the scene picture of the virtual scene;
  • the height is used to control the field of view of the scene picture of the virtual scene;
  • the height of the virtual camera is used to indicate the distance between the virtual camera and the virtual scene on the vertical coordinate system in the same three-dimensional coordinate system;
  • a display sub-module configured to display the second scene picture in a second representation form in the virtual scene interface in response to the height change information satisfying a first height change condition.
  • the second picture display module further includes:
  • condition determination submodule configured to change from the height interval of the first representation form to the height interval of the second representation form in response to the height change information indicating the height of the virtual camera, and determine the height change information The first height change condition is satisfied.
  • the second picture display module is configured to:
  • the second scene picture is displayed in the second presentation form in the virtual scene interface.
  • the apparatus further includes:
  • a state control module configured to control the data resource management component of the first representation form to enter an inactive state
  • the data resource destruction module is used for destroying the data resource managed by the data resource management component of the first representation form.
  • the data resource destruction module is configured to destroy the first representation in response to the duration that the data resource management component of the first representation remains in the inactive state reaches a first duration threshold Data resources are managed by the data resource management component of the form.
  • the apparatus further includes:
  • a preloading module configured to preload the data resource managed by the data resource management component of the second representation form in response to the height change information satisfying the second height change condition
  • the second height change condition includes: the height change information indicates that the height of the virtual camera is within the height interval of the first representation, and the height of the virtual camera is the same as the height of the second representation.
  • the minimum height distance between height intervals is less than the distance threshold.
  • the second height change condition further includes: the height change information indicates that the height of the virtual camera changes to a height interval of the second representation form.
  • the second picture display module is configured to:
  • the second scene picture is displayed in the second presentation form in the virtual scene interface.
  • the apparatus further includes:
  • a data deletion module configured to delete the other resources from the static data in response to the static data including other resources other than the target data resource.
  • the data deletion module is configured to delete the other resources from the static data in response to the time when the other resources have not been used reaching a second time duration threshold.
  • the apparatus further includes:
  • a performance parameter acquisition module configured to acquire performance parameters of the terminal displaying the virtual scene interface, where the performance parameters are used to indicate the graphics display performance of the terminal;
  • An interval division information acquisition module configured to acquire height interval division information based on the performance parameter; the height interval division information includes the height interval of the first representation form and the height interval of the second representation form.
  • the first representation form is a two-dimensional representation form
  • the second representation form is a three-dimensional representation form
  • the zoom operation is a zoom-in operation of the virtual scene
  • the first representation form is a three-dimensional representation form
  • the second representation form is a two-dimensional representation form
  • the zoom operation is a zoom-out operation on the virtual scene.
  • an embodiment of the present application provides a terminal, the terminal includes a processor and a memory, the memory stores at least one computer program, and the at least one computer program is loaded and executed by the processor to implement The virtual scene display method described in the above aspects.
  • an embodiment of the present application provides a computer-readable storage medium, where at least one computer program is stored in the computer-readable storage medium, and the at least one computer program is loaded and executed by a processor to implement the above aspect The virtual scene display method.
  • a computer program product or computer program comprising computer instructions stored in a computer readable storage medium.
  • the processor of the terminal reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the terminal executes the virtual scene display method provided in various optional implementation manners of the foregoing aspects.
  • the scene picture of the virtual scene can be switched to the two-dimensional representation form and the three-dimensional representation form under the trigger of the zoom operation of the virtual scene.
  • Another form of expression in the above process, users do not need to exit the scene screen to set, and only need to reuse the zoom operation of the virtual scene, which can realize flexible switching of the expression form of the scene screen, thereby significantly reducing user operations.
  • the complexity of the process improves the switching efficiency of the representation of the virtual scene.
  • FIG. 1 is a schematic diagram of a virtual scene display system provided by an exemplary embodiment of the present application.
  • FIG. 2 is a schematic diagram of a virtual scene interface provided by an exemplary embodiment of the present application.
  • FIG. 3 is a schematic flowchart of a virtual scene display method provided by an exemplary embodiment of the present application.
  • FIG. 4 is a schematic flowchart of a virtual scene display method provided by an exemplary embodiment of the present application.
  • 5 to 7 are schematic diagrams of the height of the virtual camera and the shooting object involved in the embodiment shown in FIG. 4;
  • FIG. 8 is a schematic diagram of the height and representation of the camera involved in the embodiment shown in FIG. 4;
  • FIG. 9 is a schematic diagram of a common display model involved in the embodiment shown in FIG. 4;
  • FIG. 10 is a schematic diagram of a display model involved in the embodiment shown in FIG. 4;
  • FIG. 11 is a schematic diagram of the virtual scene data configuration involved in the embodiment shown in FIG. 4;
  • Fig. 12 is a schematic diagram of scene slicing involved in the embodiment shown in Fig. 4;
  • FIG. 13 is a schematic diagram of static data loading involved in the embodiment shown in FIG. 4;
  • FIG. 14 is an enlarged schematic diagram of the virtual scene involved in the embodiment shown in FIG. 4;
  • Fig. 15 is a schematic diagram of a reduced virtual scene involved in the embodiment shown in Fig. 4;
  • 16 is a structural block diagram of a virtual scene display device provided by an exemplary embodiment of the present application.
  • FIG. 17 is a structural block diagram of a computer device provided by an exemplary embodiment of the present application.
  • Virtual scene is a virtual scene displayed (or provided) when the application runs on the terminal.
  • the virtual scene may be a simulated environment scene of the real world, a semi-simulated and semi-fictional three-dimensional environment scene, or a purely fictional three-dimensional environment scene.
  • the virtual scene can be any one of a 2D virtual scene, a 2.5D virtual scene, and a 3D virtual scene.
  • the following embodiments illustrate that the virtual scene is a 2D virtual scene or a 3D virtual scene, but this is not limited.
  • the virtual scene is usually generated by an application program in a computer device such as a terminal, and displayed based on hardware (such as a screen) in the terminal.
  • the terminal may be a mobile terminal such as a smart phone, a tablet computer, or an e-book reader; or, the terminal may also be a personal computer device such as a notebook computer or a stationary computer.
  • Strategy game is a derivative game type (or branch) of Simulation Game (SLG).
  • SSG Simulation Game
  • the simulation object of the simulation game is not only an object (such as a vehicle)
  • the player needs to ensure that his simulation object achieves the goal specified by the game when playing the game.
  • Simulation games are generally more free and open, so players need to try their best to complete the goal within the limits (game rules) approved by the game. This gave birth to a whole new genre of games - strategy games. Because simulation games are generally relatively free and open, players need to use their wisdom to play the game within the limits (game rules) approved by the game.
  • Strategy games provide players with an environment where they can use their brains to think about problems to deal with more complex things, allowing players to freely control, manage and use people or things in the game. Ways to fight against enemies to achieve the goals required by the game.
  • strategy game itself is very broad, as long as the player needs to use strategy to complete the goal given by the game to win, it can be regarded as a strategy game. In this sense, most puzzle games are strategy games.
  • strategy games contained in strategy games are generally more complex. Every strategy game is not just for "puzzle”, tactical division, psychological warfare, and opportunity utilization are all strategy games that focus on performance.
  • strategy games can be divided into strategic games and tactical games; according to the way of progress, they can be divided into turn-based strategy games and real-time strategy games (RTS); according to themes, they can be divided into tactical shooting Games, Abstract Strategy Games, Strategy RPGs, Simulation RPGs, Puzzle Games and more.
  • RTS real-time strategy games
  • FIG. 1 shows a schematic diagram of a virtual scene display system provided by an embodiment of the present application.
  • the system may include: a first terminal 110 and a server 120 .
  • the first terminal 110 installs and runs an application program 111 supporting a virtual scene, and the application program 111 may be a multiplayer online battle program.
  • the application program 111 may be a multiplayer online battle program.
  • the application 111 may be a strategy game.
  • the first terminal 110 is the terminal used by the first user 112.
  • the first user 112 uses the first terminal 110 to control the first virtual object located in the virtual scene to play the game.
  • the first virtual object may be called the master virtual object of the first user 112. object.
  • the first virtual object is a first virtual character, such as a simulated character or an anime character.
  • terminals Only one terminal is shown in FIG. 1 , but there are multiple other terminals that can access the server 120 in different embodiments.
  • terminals there is also one or more terminals corresponding to the developer, on which a development and editing platform supporting the application of the virtual scene is installed, and the developer can edit and update the application on the terminal. , and transmit the updated application installation package to the server 120 through a wired or wireless network, and the first terminal 110 can download the application installation package from the server 120 to update the application.
  • the first terminal 110 and other terminals are connected to the server 120 through a wireless network or a wired network.
  • the server 120 includes at least one of a server, a server cluster composed of multiple servers, a cloud computing platform and a virtualization center.
  • the server 120 includes a memory 121 , a processor 122 , a user account database 123 , a game service module 124 , and a user-oriented Input/Output Interface (I/O interface) 125 .
  • I/O interface Input/Output Interface
  • the processor 122 is used to load the instructions stored in the server 120 and process the data in the user account database 123 and the game service module 124;
  • the user account database 123 is used to store the data used by the first terminal 110 and other terminals, such as avatars , nickname, combat effectiveness index, and service area;
  • the game service module 124 is used to provide multiple game scenarios for users to play games, such as 1V1 games, 3V3 games, 5V5 games, etc.;
  • the user-oriented I/O interface 125 is used for wireless
  • the network or wired network establishes communication with the first terminal 110 and/or other terminals to exchange data.
  • the virtual scene may be a three-dimensional virtual scene, or the virtual scene may also be a two-dimensional virtual scene, that is, the representation form of the virtual scene may be switched between two-dimensional and three-dimensional.
  • the virtual scene being a two-dimensional virtual scene as an example, please refer to FIG. 2 , which shows a schematic diagram of a virtual scene interface provided by an exemplary embodiment of the present application.
  • the virtual scene interface includes a scene screen 200 , which includes various elements visible in the virtual scene, such as cities 210 , mountains 220 , resource points 230 , and woodlands 240 .
  • Users can control the current virtual objects to perform management game activities, such as city construction, resource collection, personnel management, and initiating battles.
  • the virtual scene provides a two-dimensional representation form and a three-dimensional representation form
  • the scene image of the virtual scene switches between the two-dimensional representation form and the three-dimensional representation form during the display process.
  • FIG. 3 shows a schematic flowchart of a method for displaying a virtual scene provided by an exemplary embodiment of the present application.
  • the above-mentioned method may be executed by a computer device, and the computer device may be a terminal or a server, or the above-mentioned computer device may also include the above-mentioned terminal and server.
  • the computer device can control the display of the virtual scene by executing the following steps.
  • Step 301 displaying a virtual scene interface, where the virtual scene interface is used to display a scene picture of the virtual scene.
  • Step 302 In the virtual scene interface, display a first scene picture of the virtual scene in a first representation form; the first representation form is a two-dimensional representation form or a three-dimensional representation form.
  • Step 303 in response to receiving the zoom operation on the virtual scene, in the virtual scene interface, display the second scene picture of the virtual scene in a second representation form;
  • the second representation form is a two-dimensional representation form and a three-dimensional representation
  • another form of expression other than the first form of expression.
  • the above-mentioned zooming operation of the virtual scene refers to an operation of zooming in/out of the virtual lens that captures the scene picture in the virtual scene.
  • the size of the scene elements in the virtual scene increases in the scene picture, and the details increase.
  • the visible range of the virtual scene displayed in the virtual scene interface will be reduced, which is equivalent to The display scale of the virtual scene is enlarged.
  • a second scene image of the virtual scene is displayed in a second representation form .
  • the above scaling operation satisfies a specified condition, which may include at least one of the following situations:
  • the above-mentioned virtual camera is used to capture scene pictures of the virtual scene.
  • the height of the above-mentioned virtual camera is used to indicate the distance between the virtual camera and the virtual scene on the vertical coordinate system in the same three-dimensional coordinate system.
  • the range of the virtual scene (that is, the field of view of the scene picture of the virtual scene) is also larger, and conversely, the lower the height of the virtual camera is, the smaller the range of the virtual scene that can be photographed.
  • the operation rate of the zoom operation may be the sliding rate of the sliding touch operation.
  • the operation range of the zoom operation may be the sliding distance of the sliding touch operation.
  • the application program of the virtual scene provides two different display modes (two-dimensional and three-dimensional) corresponding to the virtual scene.
  • the scene picture of the virtual scene can be switched between the two-dimensional representation form and the three-dimensional representation form through the zoom operation of the virtual scene.
  • a zoom-in operation that meets the conditions it means that the user needs to observe a more detailed scene image.
  • the scene image can be switched to a three-dimensional representation.
  • a zoom-out operation that meets the conditions it means that the user needs a wider field of view.
  • the scene picture can be switched to a two-dimensional representation form to reduce terminal resource consumption and ensure the smoothness of the picture.
  • the virtual scene when the scene picture is displayed in a two-dimensional representation form or a three-dimensional representation form in the virtual scene interface, the virtual scene may be In the above process, it is not necessary for the user to exit the scene screen to make settings, but only need to reuse the zoom operation of the virtual scene, and then the scene can be realized.
  • the flexible switching of the presentation form of the screen can significantly reduce the complexity of the user operation process and improve the switching efficiency of the presentation form of the virtual scene.
  • FIG. 4 shows a method flow of a virtual scene display method provided by an exemplary embodiment of the present application picture.
  • the above-mentioned method may be executed by a computer device, and the computer device may be a terminal or a server, or the above-mentioned computer device may also include the above-mentioned terminal and server.
  • the terminal can control the display of the virtual scene by executing the following steps.
  • Step 401 displaying a virtual scene interface, where the virtual scene interface is used to display a scene picture of the virtual scene.
  • a virtual scene interface may be displayed first, and the virtual scene interface is used to display a scene picture of the virtual scene.
  • one or more operation controls may also be superimposed and displayed in the virtual scene interface.
  • Step 402 In the virtual scene interface, display a first scene picture of the virtual scene in a first representation form; the first representation form is a two-dimensional representation form or a three-dimensional representation form.
  • the above-mentioned virtual scene may provide two representations, that is, a two-dimensional representation and a three-dimensional representation.
  • the two-dimensional representation refers to the scene picture that displays the virtual scene with a two-dimensional image
  • the three-dimensional representation refers to the scene picture that displays the virtual scene with a three-dimensional image.
  • Step 403 in response to receiving the zooming operation on the virtual scene, obtain height change information of the virtual camera before and after the zooming operation.
  • the virtual camera is used to collect the scene picture of the virtual scene; the height of the virtual camera is used to control the field of view of the scene picture of the virtual scene.
  • the above-mentioned height change information includes the height of the virtual camera before the zooming operation, and the height of the virtual camera after the zooming operation.
  • the above-mentioned height change information further includes at least one of the following information: a rate of height change, an amount of height change, and the like.
  • the application program corresponding to the virtual scene can reduce the height of the virtual camera; on the contrary, when the above-mentioned zoom operation is a zoom-out operation on the virtual scene, The application corresponding to the virtual scene can increase the height of the virtual camera.
  • the above-mentioned zooming operation on the virtual scene may be a sliding touch operation performed in the virtual scene interface.
  • the zoom operation may be a two-finger/three-finger sliding operation; for example, the two-finger/three-finger inward sliding operation is a zoom-out operation on the virtual scene; and the two-finger/three-finger outward sliding operation is a A zoom-in operation of the virtual scene.
  • the above-mentioned zooming operation on the virtual scene may be a triggering operation on a specified control.
  • the specified controls may include a zoom-out control and a zoom-in control.
  • the click/press operation on the zoom-out control is a zoom-out operation on the virtual scene; and the click/press operation on the zoom-in control is a zoom-in operation on the virtual scene.
  • the specified control may include sliding conditions, and sliding operations in different directions on the sliding conditions are respectively a zoom-out operation and a zoom-in operation of the virtual scene.
  • Step 404 in response to the height change information satisfying the first height change condition, display the second scene picture in the second representation form in the virtual scene interface.
  • the second representation form is another representation form other than the first representation form among the two-dimensional representation form and the three-dimensional representation form.
  • the above-mentioned height change information satisfies the first height change condition, which may include at least one of the following conditions:
  • the conversion of the scene picture of the virtual scene between the two-dimensional representation form and the three-dimensional representation form can be triggered.
  • the height change information indicating the height of the virtual camera, changing from the height interval of the first representation form to the height interval of the second representation form, it is determined that the height change information satisfies the first height change condition.
  • the display object (or picture content) in the virtual scene interface is related to the camera state of the virtual camera, and the camera state of the virtual camera may be determined by the height of the virtual camera .
  • the display objects in the virtual scene interface may include three types, namely the map of the virtual scene, the overall virtual scene, and a certain scene element in the virtual scene (such as a city, a mountain, a forest or a scene in the virtual scene). mines, etc.), that is to say, at different heights of the virtual camera, the objects photographed by the virtual camera are different.
  • FIG. 5 to FIG. 7 show schematic diagrams of the height of the virtual camera and the shooting object involved in the embodiment of the present application.
  • the object photographed by the virtual camera can be the map 51 of the virtual scene (corresponding to the state of the camera being the map display state); as shown in FIG. 6 , when the height of the virtual camera is at In the interval [3250, 7000], the object shot by the virtual camera can be the overall virtual scene 61 (corresponding to the camera state being the virtual scene display state); as shown in FIG. 7, when the height of the virtual camera is less than 3000, the virtual camera The photographed object may be a certain scene element 71 in the virtual scene (the corresponding camera state is the scene element display state).
  • the camera state is further divided, that is, the virtual scene display state is divided into a two-dimensional virtual scene display state and a two-dimensional virtual scene display state.
  • 3D virtual scene display state for example, when the height of the virtual camera is in the interval [3250, 4500], the object photographed by the virtual camera can be a 3D virtual scene (corresponding to the camera state being the 3D virtual scene display state); when the height of the virtual camera is in the range [3250, 4500]
  • the object photographed by the virtual camera may be a two-dimensional virtual scene (corresponding to the camera state being a two-dimensional virtual scene display state).
  • the camera state can be represented by the camera state level, for example, the scene element display state corresponds to the camera state level 1, the three-dimensional virtual scene display state corresponds to the camera state level 2, and the two-dimensional virtual scene display state corresponds to the camera state level 2.
  • the scene display state corresponds to the camera state level 3, and the map display state corresponds to the camera state level 4.
  • the interval in which the height of the virtual camera is located changes, which can trigger the switching of the representation of the scene image; for example, when the height of the virtual camera is within the above-mentioned height
  • the virtual scene picture is triggered to switch from the 3D scene picture (the first scene picture) to the 2D scene picture (the second scene picture) ); on the contrary, when the height of the virtual camera is reduced from the interval [4700, 7000] to the interval [3250, 4500] under the control of the above zoom operation, the virtual scene picture is triggered to change from the two-dimensional scene picture (the first scene picture) to switch to the 3D scene screen (the second scene screen).
  • FIG. 8 shows a schematic diagram of the height and representation of the camera involved in the embodiment of the present application.
  • the virtual camera 81 in the strategy game, as the player performs a zooming gesture on the screen, the virtual camera 81 will move along the Z axis, if the player performs a zooming gesture on the screen. As the Z coordinate value of the virtual camera 81 increases, the visual range of the virtual camera 81 will gradually expand. When the Z coordinate of the virtual camera 81 enters the 2D presentation field of view, the player will automatically switch the presentation form to the 2D presentation form. On the contrary, when the user performs a zoom out gesture, the Z coordinate value of the virtual camera 81 becomes smaller, and the visual range of the virtual camera 81 is reduced.
  • Parameters related to the 2D and 3D representation of the virtual camera can be set in the application code.
  • CameraZMinValue and CameraZMaxValue respectively correspond to the maximum and minimum values of the camera Z-axis of the current representation.
  • the current virtual camera is in the state of WorldCameraStatLevel2 (that is, the above-mentioned camera state level 2). If the Z axis of the virtual camera continues to increase, then when the Z value is greater than the value of CameraMoveMaxValue in the current state (that is, the above 4500), the virtual camera will switch to WorldCameraStatLevel3 (that is, the above camera state level 3) this state. The same is true for the reverse operation. If the Z value of the camera is less than the CameraMoveMinValue (that is, the above 4700) value under the camera status level 3, the camera status of the virtual camera will be switched from WorldCameraStatLevel3 to WorldCameraStatLevel2.
  • Each camera state corresponds to the corresponding performance, such as the close-up camera, which is aimed at viewing the details of the main city, that is, the above-mentioned camera state level 1.
  • a normal 3D camera is a camera that renders 3D representations and has different camera settings from 2D scenes, where perspective cameras are commonly used.
  • the camera state level 3 is usually the strategic map camera state, using an orthographic camera, and the modified parameters can also be different when zooming.
  • Camera state level 4 is the camera state of the world map, which can also be an orthographic camera.
  • the conversion of the scene picture of the virtual scene between the two-dimensional representation form and the three-dimensional representation form can be triggered.
  • the above-mentioned zoom operation controls the height of the virtual camera to increase (that is, the above-mentioned zoom operation is a zoom-out operation)
  • the scene image of the virtual scene is triggered to be converted from a three-dimensional representation form to a two-dimensional representation form
  • the above-mentioned zoom operation controls the height of the virtual camera to decrease (that is, the above-mentioned zoom operation is a zoom-in operation)
  • the scene picture of the trigger virtual scene changes from a two-dimensional representation to a three-dimensional representation convert.
  • the conversion of the scene picture of the virtual scene between the two-dimensional representation form and the three-dimensional representation form can be triggered.
  • the above-mentioned zoom operation controls the height of the virtual camera to increase (that is, the above-mentioned zoom operation is a zoom-out operation)
  • the scene image of the virtual scene is triggered to change from a three-dimensional representation to a two-dimensional representation or, when the height change value of the virtual camera is greater than the height change threshold, and the above-mentioned zoom operation controls the height of the virtual camera to decrease (that is, the above-mentioned zoom operation is a zoom-in operation)
  • trigger the scene picture of the virtual scene to change from a two-dimensional representation to a three-dimensional Expression conversion when the height change value of the virtual camera is greater than the height change threshold, and the above-mentioned zoom operation controls the height of the virtual camera to increase (that is, the above-mentioned zoom operation is a zoom-out operation)
  • the scene image of the virtual scene is triggered to change from a three-dimensional representation to a two-dimensional representation or, when the height change value of the virtual camera is greater than the height
  • the application program corresponding to the virtual scene when the application program corresponding to the virtual scene displays the second scene picture of the virtual scene in the second representation form in the virtual scene interface, the application program corresponding to the virtual scene may activate the second representation in response to receiving the zoom operation A data resource management component in the form; through the data resource management component in the second representation, based on the height of the virtual camera after the zoom operation, the second scene picture is displayed in the second representation in the virtual scene interface.
  • the application program corresponding to the virtual scene can also control the data resource management component of the first representation form to transfer to an inactive state; and destroy the data resources managed by the data resource management component of the first representation form .
  • two data resource management components may be started, corresponding to a 2D representation form and a 3D representation form, respectively, and one of the two data resource management components is activated Status, used to display the scene picture corresponding to the virtual scene.
  • the data resources of the two forms are not common, when one data resource management component is in an active state, in order to save memory resources, the data resources managed by another inactive data resource management component may be destroyed.
  • FIG. 9 shows a schematic diagram of a common display model involved in an embodiment of the present application.
  • the model is loaded and displayed according to the current area seen by the virtual camera, and finally rendered to the screen by the graphics processor.
  • FIG. 10 shows a schematic diagram of a display model involved in an embodiment of the present application.
  • the display model is redesigned to support the switching of two representations at the same time.
  • the state of the virtual camera will be modified, such as switching from the 3D camera state to the 2D camera state.
  • the display of the current 3D virtual scene can be cancelled (that is, the corresponding 3D representation form can be cancelled).
  • the data resource management component 1002) executes the loading of the 2D virtual scene (that is, activate the data resource management component 1003 corresponding to the 2D representation), and then all representations will be executed in the 2D data resource management component, and handed over to the 2D data resource management component.
  • the data resource managed by the data resource management component of the first representation is destroyed.
  • the user may frequently switch between the scene images of the two representations in a short period of time.
  • the application program corresponding to the virtual scene also needs to repeatedly load and destroy data resources. , thus affecting the display effect, for example, causing frequent freezes.
  • the data resources before the switch can be retained for a period of time. Switching back to the previous representation can avoid repeated loading and destruction of data resources. If the user does not switch back to the previous representation after a period of time, the previous data resources will be destroyed to save memory space.
  • the application corresponding to the virtual scene may also preload the second representation in response to the height change information satisfying the second height change condition
  • the minimum height distance between the height intervals of the second representation is less than the distance threshold.
  • preloading of data resources may be implemented to reduce the time delay between screen switching in different representation forms.
  • the application program corresponding to the virtual scene can preload the data resources managed by the 3D data resource management component to reduce the delay caused by data loading on screen switching and improve the smoothness sex.
  • the second height change condition further includes: the height change information indicates that the height of the virtual camera changes to the height interval of the second representation form.
  • the application corresponding to the virtual scene may also determine whether to preload in combination with the direction of height change of the virtual camera. For example, when the height change information indicates that the height of the virtual camera changes to the height interval of the second representation form, it indicates that it may be about to switch to the second representation form, and preloading is performed at this time; on the contrary, if the height change information indicates that the virtual camera If the height of the camera changes in the opposite direction of the height interval of the second representation, it means that the second representation will not be switched, and preloading is not performed at this time.
  • the second representation is displayed in the virtual scene interface in the second representation
  • the target block visible to the user in the virtual scene can be determined based on the height of the virtual camera after the zoom operation;
  • the static data is loaded with the target block corresponding to the block, the target data resource of the second presentation form; based on the target data resource, the second scene picture is displayed in the second presentation form in the virtual scene interface.
  • FIG. 11 shows a schematic diagram of virtual scene data configuration involved in an embodiment of the present application.
  • the artist constructs a virtual scene (S1101), generates static data corresponding to the virtual scene (S1102), and then divides and compresses all the static data according to the virtual scene (S1103), and each piece of compressed data corresponds to a virtual scene (S1103).
  • S1101 the artist constructs a virtual scene (S1101), generates static data corresponding to the virtual scene (S1102), and then divides and compresses all the static data according to the virtual scene (S1103), and each piece of compressed data corresponds to a virtual scene (S1103).
  • S1103 shows a schematic diagram of virtual scene data configuration involved in an embodiment of the present application.
  • FIG. 12 shows a method involved in the embodiment of this application.
  • FIG. 13 shows a schematic diagram of static data loading involved in an embodiment of the present application. As shown in FIG.
  • the window calculates the target area covered by the user's visible area (S1301), and judges whether the existing static data is available (S1302), that is, whether the static data is available Include the data resource corresponding to the target block, if so, directly use the static data for screen display (S1303), otherwise, load the compressed file corresponding to the target block (S1304), decompress (S1305), and perform deserialization (S1306) , and add it to the static data, and use the static data for screen display.
  • the other resources are deleted from the static data.
  • the application program of the virtual scene may delete these data resources.
  • the other resource in response to the time period that the other resource has not been used reaches a second time period threshold, the other resource is deleted from the static data.
  • the application program of the virtual scene deletes the unused data resources in the static data
  • the data whose unused duration reaches the second duration threshold in the static data can be deleted, and the data whose unused duration does not reach the second duration threshold can continue to be retained.
  • the height interval of the first representation form and the height interval of the second representation form may be preset by the developer, or preset by the user.
  • the application program of the virtual scene can obtain the performance parameter of the terminal displaying the interface of the virtual scene, the performance parameter is used to indicate the graphics display performance of the terminal; based on the performance parameter, the height interval division information is obtained ;
  • the height interval division information includes the height interval of the first representation form and the height interval of the second representation form.
  • the application program of the virtual scene may determine different height interval division information for terminals with different performances. For example, for a terminal with high graphics display performance, the application program of the virtual scene can set a relatively wide height interval of three-dimensional representation, such as [3250, 5500], while for a terminal with low graphics display performance, the application program of the virtual scene You can set a narrower height interval of the 3D representation, such as [3250, 4000].
  • the first representation form is a two-dimensional representation form
  • the second representation form is a three-dimensional representation form
  • the zoom operation is a zoom-in operation of the virtual scene.
  • FIG. 14 shows an enlarged schematic diagram of a virtual scene involved in an embodiment of the present application.
  • the application program of the virtual scene can display a virtual scene interface, the virtual scene interface is used to display the scene picture of the virtual scene; in the virtual scene interface, the first scene picture 1401 of the virtual scene is displayed in a two-dimensional representation; After the zoom-in operation of the virtual scene, and the field of view of the zoomed-in scene image of the virtual scene is smaller than the range threshold, the second scene image 1402 of the virtual scene is displayed in a three-dimensional representation form.
  • the first representation form is a three-dimensional representation form
  • the second representation form is a two-dimensional representation form
  • the zoom operation is a zoom-out operation of the virtual scene.
  • FIG. 15 shows a schematic diagram of a reduced virtual scene involved in an embodiment of the present application.
  • the application program of the virtual scene can display a virtual scene interface, which is used to display the scene picture of the virtual scene; in the virtual scene interface, the first scene picture 1501 of the virtual scene is displayed in a three-dimensional representation; The virtual scene is zoomed out, and the reduced field of view of the virtual scene's scene image is greater than the range threshold, and the second scene image 1502 of the virtual scene is displayed in a two-dimensional representation form.
  • the virtual scene when the scene picture is displayed in a two-dimensional representation form or a three-dimensional representation form in the virtual scene interface, the virtual scene may be In the above process, it is not necessary for the user to exit the scene screen to make settings, but only need to reuse the zoom operation of the virtual scene, and then the scene can be realized.
  • the flexible switching of the presentation form of the screen can significantly reduce the complexity of the user operation process and improve the switching efficiency of the presentation form of the virtual scene.
  • FIG. 16 is a structural block diagram of a virtual scene display device provided by an exemplary embodiment of the present application, and the device can be used to execute all or part of the steps in the method shown in FIG. 3 or FIG. 4 , and the device includes:
  • the interface display module 1601 is used to display a virtual scene interface, and the virtual scene interface is used to display the scene picture of the virtual scene;
  • a first image display module 1602 configured to display the first scene image of the virtual scene in a first representation form in the virtual scene interface;
  • the first representation form is a two-dimensional representation form or a three-dimensional representation form;
  • the second picture display module 1603 is configured to display the second scene picture of the virtual scene in the second representation form in the virtual scene interface in response to receiving the zoom operation on the virtual scene; the second scene picture
  • the representation form is another representation form other than the first representation form among the two-dimensional representation form and the three-dimensional representation form.
  • the second picture display module 1603 includes:
  • an information acquisition sub-module configured to acquire the height change information of the virtual camera before and after the zoom operation in response to receiving the zoom operation;
  • the virtual camera is used to collect the scene picture of the virtual scene;
  • the height is used to control the field of view of the scene picture of the virtual scene;
  • the height of the virtual camera is used to indicate the distance between the virtual camera and the virtual scene on the vertical coordinate system in the same three-dimensional coordinate system;
  • a display sub-module configured to display the second scene picture in a second representation form in the virtual scene interface in response to the height change information satisfying a first height change condition.
  • the second picture display module 1603 further includes:
  • condition determination submodule configured to change from the height interval of the first representation form to the height interval of the second representation form in response to the height change information indicating the height of the virtual camera, and determine the height change information The first height change condition is satisfied.
  • the second picture display module 1603 is configured to:
  • the second scene picture is displayed in the second presentation form in the virtual scene interface.
  • the apparatus further includes:
  • a state control module configured to control the data resource management component of the first representation form to enter an inactive state
  • the data resource destruction module is used for destroying the data resource managed by the data resource management component of the first representation form.
  • the data resource destruction module is configured to destroy the first representation in response to the duration that the data resource management component of the first representation remains in the inactive state reaches a first duration threshold Data resources are managed by the data resource management component of the form.
  • the apparatus further includes:
  • a preloading module configured to preload the data resource managed by the data resource management component of the second representation form in response to the height change information satisfying the second height change condition
  • the second height change condition includes: the height change information indicates that the height of the virtual camera is within the height interval of the first representation, and the height of the virtual camera is the same as the height of the second representation.
  • the minimum height distance between height intervals is less than the distance threshold.
  • the second height change condition further includes: the height change information indicates that the height of the virtual camera changes to the height interval of the second representation form.
  • the second picture display module 1603 is configured to:
  • the second scene picture is displayed in the second presentation form in the virtual scene interface.
  • the apparatus further includes:
  • a data deletion module configured to delete the other resources from the static data in response to the static data including other resources other than the target data resource.
  • the data deletion module is configured to delete the other resources from the static data in response to the time when the other resources have not been used reaching a second time duration threshold.
  • the apparatus further includes:
  • a performance parameter acquisition module configured to acquire performance parameters of the terminal displaying the virtual scene interface, where the performance parameters are used to indicate the graphics display performance of the terminal;
  • An interval division information acquisition module configured to acquire height interval division information based on the performance parameter; the height interval division information includes the height interval of the first representation form and the height interval of the second representation form.
  • the first representation form is a two-dimensional representation form
  • the second representation form is a three-dimensional representation form
  • the zoom operation is a zoom-in operation of the virtual scene
  • the first representation form is a three-dimensional representation form
  • the second representation form is a two-dimensional representation form
  • the zoom operation is a zoom-out operation on the virtual scene.
  • the virtual scene when the scene picture is displayed in a two-dimensional representation form or a three-dimensional representation form in the virtual scene interface, the virtual scene may be In the above process, it is not necessary for the user to exit the scene screen to make settings, but only need to reuse the zoom operation of the virtual scene, and then the scene can be realized.
  • the flexible switching of the presentation form of the screen can significantly reduce the complexity of the user operation process and improve the switching efficiency of the presentation form of the virtual scene.
  • FIG. 17 is a structural block diagram of a computer device 1700 according to an exemplary embodiment.
  • the computer device 1700 may be a user terminal, such as a smart phone, a tablet computer, an MP3 player (Moving Picture Experts Group Audio Layer III, moving picture expert compression standard audio layer 3), MP4 (Moving Picture Experts Group Audio Layer IV, moving picture Expert Compression Standard Audio Layer 4) Player, Laptop or Desktop.
  • Computer device 1700 may also be called user equipment, portable terminal, laptop terminal, desktop terminal, and the like by other names.
  • computer device 1700 includes: processor 1701 and memory 1702 .
  • the processor 1701 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and the like.
  • the processor 1701 can use at least one hardware form among DSP (Digital Signal Processing, digital signal processing), FPGA (Field-Programmable Gate Array, field programmable gate array), PLA (Programmable Logic Array, programmable logic array) accomplish.
  • DSP Digital Signal Processing, digital signal processing
  • FPGA Field-Programmable Gate Array, field programmable gate array
  • PLA Programmable Logic Array, programmable logic array
  • Memory 1702 may include one or more computer-readable storage media, which may be non-transitory. Memory 1702 may also include high-speed random access memory, as well as non-volatile 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 1702 is used to store at least one computer program, and the at least one computer program is used to be executed by the processor 1701 to implement the methods provided by the method embodiments in this application. all or part of the steps in the method.
  • computer device 1700 may also optionally include a peripheral device interface 1703 and at least one peripheral device.
  • the processor 1701, the memory 1702 and the peripheral device interface 1703 may be connected through a bus or a signal line.
  • Each peripheral device can be connected to the peripheral device interface 1703 through a bus, a signal line or a circuit board.
  • the peripheral devices include: at least one of a radio frequency circuit 1704 , a display screen 1705 , a camera assembly 1706 , an audio circuit 1707 and a power supply 1709 .
  • computer device 1700 also includes one or more sensors 1710 .
  • the one or more sensors 1710 include, but are not limited to, an acceleration sensor 1711 , a gyro sensor 1712 , a pressure sensor 1713 , an optical sensor 1715 and a proximity sensor 1716 .
  • FIG. 17 does not constitute a limitation on the computer device 1700, and may include more or less components than those shown, or combine some components, or adopt different component arrangements.
  • a non-transitory computer-readable storage medium including instructions, such as a memory including at least one computer program, which can be executed by a processor to complete the above-mentioned FIG. 3 or FIG. 4 corresponds to all or part of the steps of the method shown in the embodiment.
  • the non-transitory computer-readable storage medium may be ROM (Read-Only Memory, read-only memory), random access memory (Random Access Memory, RAM), CD-ROM (Compact Disc Read-Only Memory, only CD-ROM), magnetic tapes, floppy disks, and optical data storage devices, etc.
  • a computer program product or computer program comprising computer instructions stored in a computer readable storage medium.
  • the processor of the 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 methods provided in various optional implementations of the above aspects.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Graphics (AREA)
  • Computer Hardware Design (AREA)
  • General Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Architecture (AREA)
  • Evolutionary Computation (AREA)
  • Databases & Information Systems (AREA)
  • Artificial Intelligence (AREA)
  • Medical Informatics (AREA)
  • Human Computer Interaction (AREA)
  • Business, Economics & Management (AREA)
  • General Business, Economics & Management (AREA)
  • Computer Security & Cryptography (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Remote Sensing (AREA)
  • Geometry (AREA)
  • Psychiatry (AREA)
  • Social Psychology (AREA)
  • Processing Or Creating Images (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

本申请实施例公开了一种虚拟场景显示方法、装置、设备、存储介质及程序产品,属于虚拟场景技术领域。该方法包括:显示虚拟场景界面(301);在虚拟场景界面中,以第一表现形式显示虚拟场景的第一场景画面(302);所述第一表现形式是二维表现形式或者三维表现形式;响应于接收到对所述虚拟场景的缩放操作,在所述虚拟场景界面中,以第二表现形式显示所述虚拟场景的第二场景画面(303)。

Description

虚拟场景显示方法、装置、设备、存储介质及程序产品
本申请要求于2021年01月25日提交的、申请号为202110097445.6、发明名称为“虚拟场景展示方法、装置、计算机设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及虚拟场景技术领域,特别涉及一种虚拟场景显示方法、装置、设备、存储介质及程序产品。
背景技术
目前,在策略游戏中,用户可以选择通过2维或者3维的表现形式来显示游戏场景。
在相关技术中,同时支持2维表现形式和3维表现形式的游戏客户端可以提供2维/3维设置功能,用户在进入游戏场景之前,可以通过该设置功能来设置游戏场景的表现形式,比如,设置游戏场景的表现形式为3维表现形式。后续用户进入游戏场景后,游戏客户端会显示3维的游戏场景。
然而,相关技术中,当用户需要切换游戏场景的表现形式时,需要退出游戏场景进行设置,然后再进入游戏场景,用户操作过程复杂,影响游戏场景的表现形式的切换效率。
发明内容
本申请实施例提供了一种虚拟场景显示方法、装置、设备、存储介质及程序产品。所述技术方案如下:
一方面,本申请实施例提供了一种虚拟场景显示方法,所述方法包括:
显示虚拟场景界面,所述虚拟场景界面用于显示虚拟场景的场景画面;
在所述虚拟场景界面中,以第一表现形式显示所述虚拟场景的第一场景画面;所述第一表现形式是二维表现形式或者三维表现形式;
响应于接收到对所述虚拟场景的缩放操作,在所述虚拟场景界面中,以第二表现形式显示所述虚拟场景的第二场景画面;所述第二表现形式是二维表现形式和三维表现形式中,除了所述第一表现形式之外的另一种表现形式。
另一方面,本申请实施例提供了一种虚拟场景显示装置,所述装置包括:
界面显示模块,用于显示虚拟场景界面,所述虚拟场景界面用于显示虚拟场景的场景画面;
第一画面显示模块,用于在所述虚拟场景界面中,以第一表现形式显示所述虚拟场景的第一场景画面;所述第一表现形式是二维表现形式或者三维表现形式;
第二画面显示模块,用于响应于接收到对所述虚拟场景的缩放操作,在所述虚拟场景界面中,以第二表现形式显示所述虚拟场景的第二场景画面;所述第二表现形式是二维表现形式和三维表现形式中,除了所述第一表现形式之外的另一种表现形式。
在一种可能的实现方式中,所述第二画面显示模块,包括:
信息获取子模块,用于响应于接收到所述缩放操作,获取虚拟相机在所述缩放操作前后的高度变化信息;所述虚拟相机用于采集所述虚拟场景的场景画面;所述虚拟相机的高度用于控制所述虚拟场景的场景画面的视野范围;所述虚拟相机的高度,用于指示所述虚拟相机与所述虚拟场景在同一个三维坐标系中的垂直坐标系上的距离;
显示子模块,用于响应于所述高度变化信息满足第一高度变化条件,在所述虚拟场景界 面中,以第二表现形式显示所述第二场景画面。
在一种可能的实现方式中,所述第二画面显示模块,还包括:
条件确定子模块,用于响应于所述高度变化信息指示所述虚拟相机的高度,从所述第一表现形式的高度区间变化至所述第二表现形式的高度区间,确定所述高度变化信息满足所述第一高度变化条件。
在一种可能的实现方式中,所述第二画面显示模块,用于,
响应于接收到所述缩放操作,激活所述第二表现形式的数据资源管理组件;
通过所述第二表现形式的数据资源管理组件,基于所述虚拟相机在所述缩放操作之后的高度,在所述虚拟场景界面中以所述第二表现形式显示所述第二场景画面。
在一种可能的实现方式中,所述装置还包括:
状态控制模块,用于控制所述第一表现形式的数据资源管理组件转入非激活状态;
数据资源销毁模块,用于销毁所述第一表现形式的数据资源管理组件管理的数据资源。
在一种可能的实现方式中,所述数据资源销毁模块,用于响应于所述第一表现形式的数据资源管理组件保持在非激活状态的时长达到第一时长阈值,销毁所述第一表现形式的数据资源管理组件管理的数据资源。
在一种可能的实现方式中,所述装置还包括:
预加载模块,用于响应于所述高度变化信息满足第二高度变化条件,预加载所述第二表现形式的数据资源管理组件管理的数据资源;
其中,所述第二高度变化条件包括:所述高度变化信息指示所述虚拟相机的高度处于所述第一表现形式的高度区间内,且所述虚拟相机的高度与所述第二表现形式的高度区间之间的最小高度距离小于距离阈值。
在一种可能的实现方式中,所述第二高度变化条件还包括:所述高度变化信息指示所述虚拟相机的高度向所述第二表现形式的高度区间变化。
在一种可能的实现方式中,所述第二画面显示模块,用于,
基于所述虚拟相机在所述缩放操作之后的高度,确定所述虚拟场景中对用户可见的目标区块;
通过所述第二表现形式的数据资源管理组件,在静态数据中加载与所述目标区块对应的,所述第二表现形式的目标数据资源;
基于所述目标数据资源,在所述虚拟场景界面中以所述第二表现形式显示所述第二场景画面。
在一种可能的实现方式中,所述装置还包括:
数据删除模块,用于响应于所述静态数据中包含所述目标数据资源之外的其它资源,将所述其它资源从所述静态数据中删除。
在一种可能的实现方式中,所述数据删除模块,用于响应于所述其它资源未被使用的时长达到第二时长阈值,将所述其它资源从所述静态数据中删除。
在一种可能的实现方式中,所述装置还包括:
性能参数获取模块,用于获取显示所述虚拟场景界面的终端的性能参数,所述性能参数用于指示所述终端的图形显示性能;
区间划分信息获取模块,用于基于所述性能参数,获取高度区间划分信息;所述高度区间划分信息包括所述第一表现形式的高度区间,以及所述第二表现形式的高度区间。
在一种可能的实现方式中,所述第一表现形式为二维表现形式,所述第二表现形式为三维表现形式,所述缩放操作是对所述虚拟场景的放大操作;
或者,
所述第一表现形式为三维表现形式,所述第二表现形式为二维表现形式,所述缩放操作是对所述虚拟场景的缩小操作。
另一方面,本申请实施例提供了一种终端,所述终端包括处理器和存储器,所述存储器中存储有至少一条计算机程序,所述至少一条计算机程序由所述处理器加载并执行以实现如上述方面所述的虚拟场景显示方法。
另一方面,本申请实施例提供了一种计算机可读存储介质,所述计算机可读存储介质中存储有至少一条计算机程序,所述至少一条计算机程序由处理器加载并执行以实现如上述方面所述的虚拟场景显示方法。
根据本申请的一个方面,提供了一种计算机程序产品或计算机程序,该计算机程序产品或计算机程序包括计算机指令,该计算机指令存储在计算机可读存储介质中。终端的处理器从计算机可读存储介质读取该计算机指令,处理器执行该计算机指令,使得该终端执行上述方面的各种可选实现方式中提供的虚拟场景显示方法。
本申请实施例提供的技术方案的有益效果至少包括:
在虚拟场景界面中以二维表现形式或三维表现形式显示场景画面的情况下,可以在对虚拟场景的缩放操作的触发下,将虚拟场景的场景画面切换至二维表现形式和三维表现形式中的另一种表现形式;上述过程中,不需要用户退出场景画面进行设置,只需要复用对虚拟场景的缩放操作,即可以实现对场景画面的表现形式的灵活切换,从而显著的降低用户操作过程的复杂度,提高了虚拟场景的表现形式的切换效率。
附图说明
图1是本申请一个示例性的实施例提供的虚拟场景显示系统的示意图;
图2是本申请一个示例性实施例提供的虚拟场景界面示意图;
图3是本申请一个示例性的实施例提供的虚拟场景显示方法的流程示意图;
图4是本申请一个示例性的实施例提供的虚拟场景显示方法的流程示意图;
图5至图7是图4所示实施例涉及的虚拟相机的高度与拍摄对象的示意图;
图8是图4所示实施例涉及的相机高度与表现形式示意图;
图9是图4所示实施例涉及的常见的显示模型示意图;
图10是图4所示实施例涉及的显示模型示意图;
图11是图4所示实施例涉及的虚拟场景数据配置示意图;
图12是图4所示实施例涉及的场景切块示意图;
图13是图4所示实施例涉及的静态数据加载示意图;
图14是图4所示实施例涉及的虚拟场景放大示意图;
图15是图4所示实施例涉及的虚拟场景缩小示意图;
图16是本申请一个示例性的实施例提供的虚拟场景显示装置的结构框图;
图17是本申请一示例性实施例提供的计算机设备的结构框图。
具体实施方式
虚拟场景:是应用程序在终端上运行时显示(或提供)的虚拟的场景。该虚拟场景可以是对真实世界的仿真环境场景,也可以是半仿真半虚构的三维环境场景,还可以是纯虚构的三维环境场景。虚拟场景可以是二维虚拟场景、2.5维虚拟场景和三维虚拟场景中的任意一种,下述实施例以虚拟场景是二维虚拟场景或者三维虚拟场景来举例说明,但对此不加以限定。
虚拟场景通常由终端等计算机设备中的应用程序生成,并基于终端中的硬件(比如屏幕)进行显示。该终端可以是智能手机、平板电脑或者电子书阅读器等移动终端;或者,该终端也可以是笔记本电脑或者固定式计算机的个人计算机设备。
策略游戏:策略游戏是一种模拟战略游戏(Simulation Game,SLG)的衍生游戏类型(或分支)。当模拟游戏的模拟对象不单单是一种物体(如载具)时,玩家就需要在进行游戏时保证自己的模拟对象达成游戏规定的目标。而模拟游戏一般都较为自由和开放,所以玩家就需要在游戏认可的限度(游戏规则)内想尽办法完成目标。这催生了全新的游戏类型——策略游戏。因为模拟游戏一般都较为自由和开放,所以玩家就需要在游戏认可的限度(游戏规则)内,运用智慧来进行游戏。
策略游戏提供给玩家一个可以动脑筋思考问题来处理较复杂事情的环境,允许玩家自由控制、管理和使用游戏中的人、或事物,通过这种自由的手段,以及玩家们开动脑筋想出的对抗敌人的办法,来达到游戏所要求的目标。
策略游戏本身的含义非常广泛,只要玩家需运用策略完成游戏所给的目标获得胜利,即可算作策略游戏。从这个意义上来说,大多数益智游戏都是策略游戏。策略游戏所包含的“策略”一般都较为复杂。每一款策略游戏都不单单是为了“益智”,战术分部、心理战、机会利用都是策略游戏注重表现的。
策略游戏按照规模划分,可以分为战略游戏和战术游戏;按照进行方式划分,可以分为回合制策略游戏和即时策略游戏(Real-Time Strategy Game,RTS);按照主题划分,可以分为战术射击游戏、抽象策略游戏、策略角色扮演游戏、模拟角色扮演游戏、益智游戏等等。
请参考图1,其示出了本申请一个实施例提供的虚拟场景显示系统的示意图。该系统可以包括:第一终端110、服务器120。
第一终端110安装和运行有支持虚拟场景的应用程序111,该应用程序111可以是多人在线对战程序。当第一终端运行应用程序111时,第一终端110的屏幕上显示应用程序111的用户界面。该应用程序111可以是策略游戏。第一终端110是第一用户112使用的终端,第一用户112使用第一终端110控制位于虚拟场景中的第一虚拟对象进行游戏,第一虚拟对象可以称为第一用户112的主控虚拟对象。示意性的,第一虚拟对象是第一虚拟人物,比如仿真人物或动漫人物。
图1中仅示出了一个终端,但在不同实施例中存在多个其它终端可以接入服务器120。可选地,还存在一个或多个终端是开发者对应的终端,在该终端上安装有支持虚拟场景的应用程序的开发和编辑平台,开发者可在该终端上对应用程序进行编辑和更新,并将更新后的应用程序安装包通过有线或无线网络传输至服务器120,第一终端110可以从服务器120下载应用程序安装包实现对应用程序的更新。
第一终端110以及其它终端通过无线网络或有线网络与服务器120相连。
服务器120包括一台服务器、多台服务器组成的服务器集群、云计算平台和虚拟化中心中的至少一种。
在一个示意性的例子中,服务器120包括存储器121、处理器122、用户账号数据库123、游戏服务模块124、面向用户的输入/输出接口(Input/Output Interface,I/O接口)125。其中,处理器122用于加载服务器120中存储的指令,处理用户账号数据库123和游戏服务模块124中的数据;用户账号数据库123用于存储第一终端110以及其它终端所使用的数据,比如头像、昵称、战斗力指数、所在的服务区;游戏服务模块124用于提供多个游戏场景供用户进行游戏,比如1V1游戏、3V3游戏、5V5游戏等;面向用户的I/O接口125用于通过无线网络或有线网络和第一终端110和/或其它终端建立通信交换数据。
其中,虚拟场景可以是三维虚拟场景,或者,虚拟场景也可以是二维虚拟场景,也就是说,虚拟场景的表现形式可以在二维和三维之间切换。以虚拟场景是二维虚拟场景为例,请参考图2,其示出了本申请一个示例性的实施例提供的虚拟场景界面示意图。如图2所示,虚拟场景界面中包含场景画面200,该场景画面200中包括虚拟场景中可见的各项元素,比如,城市210、山地220、资源点230以及林地240等等。
用户可以控制当前的虚拟对象进行管理类的游戏活动,比如城市建设、资源采集、人员管理、发起对战等等。
在本申请后续的各个实施例中,虚拟场景提供二维变现形式和三维表现形式,并且,虚拟场景的场景画面在显示过程中,在二维变现形式和三维表现形式之间切换。
请参考图3,其示出了本申请一个示例性的实施例提供的一种虚拟场景显示方法的流程示意图。其中,上述方法可以由计算机设备执行,该计算机设备可以是终端,也可以是服务器,或者,上述计算机设备也可以包含上述终端和服务器。如图3所示,计算机设备可以通过执行以下步骤来控制虚拟场景的显示。
步骤301,显示虚拟场景界面,该虚拟场景界面用于显示虚拟场景的场景画面。
步骤302,在该虚拟场景界面中,以第一表现形式显示该虚拟场景的第一场景画面;该第一表现形式是二维表现形式或者三维表现形式。
步骤303,响应于接收到对该虚拟场景的缩放操作,在该虚拟场景界面中,以第二表现形式显示该虚拟场景的第二场景画面;该第二表现形式是二维表现形式和三维表现形式中,除了该第一表现形式之外的另一种表现形式。
其中,上述该虚拟场景的缩放操作,是指对采集该虚拟场景中的场景画面的虚拟镜头的拉近/拉远的操作。
其中,对虚拟镜头执行拉近操作时,虚拟场景中的场景元素的尺寸在场景画面中增大,细节增加,相应的,虚拟场景界面中显示的该虚拟场景的可见范围会缩小,相当于对虚拟场景的显示比例尺进行放大。
反之,对虚拟镜头执行拉远操作时,虚拟场景中的场景元素的尺寸在场景画面中缩小,细节减少,相应的,虚拟场景界面中显示的该虚拟场景的可见范围会变大,相当于对虚拟场景的显示比例尺进行缩小。
在一种可能的实现方式中,响应于接收到对该虚拟场景的缩放操作,且该缩放操作满足指定条件,在该虚拟场景界面中,以第二表现形式显示该虚拟场景的第二场景画面。
在一种可能的实现方式中,上述缩放操作满足指定条件,可以包括以下情况中的至少一种:
1)虚拟相机的高度在缩放操作前后的变化情况满足条件;其中,虚拟相机的高度,用于控制所述虚拟场景的场景画面的视野范围。
例如,上述虚拟相机用于采集虚拟场景的场景画面。上述虚拟相机的高度,用于指示虚拟相机与虚拟场景在同一个三维坐标系中的垂直坐标系上的距离;在虚拟相机的视野角度不变的情况,虚拟相机的高度越高,能够拍摄到的该虚拟场景的范围(也就是虚拟场景的场景画面的视野范围)也越大,反之,虚拟相机的高度越低,能够拍摄到的该虚拟场景的范围也越小。
2)缩放操作的操作速率满足条件。
例如,当缩放操作时滑动触摸操作时,缩放操作的操作速率可以是滑动触摸操作的滑动速率。
3)缩放操作的操作幅度满足条件。
例如,当缩放操作时滑动触摸操作时,缩放操作的操作幅度可以是滑动触摸操作的滑动距离。
在本申请实施例中,虚拟场景的应用程序对应虚拟场景提供两种不同表现形式的显示方式(二维和三维),并且,在以虚拟场景这个单一对象为目标进行画面显示的过程中,用户可以通过对虚拟场景的缩放操作,使得虚拟场景的场景画面在二维表现形式和三维表现形式之间进行切换。
例如,当虚拟场景界面中以二维表现形式显示场景画面时,若接收到满足条件的放大操 作,则说明用户需要观察更加细节的场景画面,此时,可以将场景画面切换至三维表现形式,以提高细节显示效果,若接收到满足条件的缩小操作,则说明用户需要更广阔的视野范围,此时,可以将场景画面切换至二维表现形式,以降低终端资源消耗,保证画面流畅度。
综上所述,本申请实施例所示的方案,在虚拟场景界面中以二维表现形式或三维表现形式显示场景画面的情况下,可以在对虚拟场景的缩放操作的触发下,将虚拟场景的场景画面切换至二维表现形式和三维表现形式中的另一种表现形式;上述过程中,不需要用户退出场景画面进行设置,只需要复用对虚拟场景的缩放操作,即可以实现对场景画面的表现形式的灵活切换,从而显著的降低用户操作过程的复杂度,提高了虚拟场景的表现形式的切换效率。
以上述缩放操作满足指定条件包括虚拟相机的高度在缩放操作前后的变化情况满足条件为例,请参考图4,其示出了本申请一个示例性的实施例提供的虚拟场景显示方法的方法流程图。其中,上述方法可以由计算机设备执行,该计算机设备可以是终端,也可以是服务器,或者,上述计算机设备也可以包含上述终端和服务器。如图4所示,以计算机设备是终端为例,终端可以通过执行以下步骤来控制虚拟场景的显示。
步骤401,显示虚拟场景界面,该虚拟场景界面用于显示虚拟场景的场景画面。
在本申请实施例中,当虚拟场景的应用程序启动时,可以首先显示虚拟场景界面,该虚拟场景界面用于显示虚拟场景的场景画面。可选的,该虚拟场景界面中还可以叠加显示一个或多个操作控件。
步骤402,在该虚拟场景界面中,以第一表现形式显示该虚拟场景的第一场景画面;该第一表现形式是二维表现形式或者三维表现形式。
在本申请实施例中,上述虚拟场景可以提供两种表现形式,即二维表现形式和三维表现形式。
其中,二维表现形式,是指以二维图像显示虚拟场景的场景画面;三维表现形式,是指以三维图像显示虚拟场景的场景画面。
步骤403,响应于接收到对该虚拟场景的缩放操作,获取虚拟相机在该缩放操作前后的高度变化信息。
其中,该虚拟相机用于采集该虚拟场景的场景画面;该虚拟相机的高度用于控制该虚拟场景的场景画面的视野范围。
在一种可能的实现方式中,上述高度变化信息包括虚拟相机在缩放操作之前的高度,以及虚拟相机在缩放操作之后的高度。
可选的,上述高度变化信息还包括以下信息中的至少一种:高度变化的速率、高度变化量等等。
在一种可能的实现方式中,当上述缩放操作是对虚拟场景的放大操作时,虚拟场景对应的应用程序可以降低虚拟相机的高度;反之,当上述缩放操作是对虚拟场景的缩小操作时,虚拟场景对应的应用程序可以增加虚拟相机的高度。
在本申请实施例中,上述对该虚拟场景的缩放操作,可以是在虚拟场景界面中执行的滑动触摸操作。比如,该缩放操作可以是双指/三指滑动操作;例如,双指/三指向内聚拢滑动的操作,是对虚拟场景的缩小操作;而双指/三指向外分散滑动的操作,是对虚拟场景的放大操作。
或者,上述对该虚拟场景的缩放操作,可以是对指定控件的触发操作。比如,指定控件可以包括缩小控件和放大控件,对缩小控件的点击/按压操作,是对虚拟场景的缩小操作;而对放大控件的点击/按压操作,是对虚拟场景的放大操作。再比如,指定控件可以包括滑动条件,在滑动条件上向不同方向的滑动操作,分别是对虚拟场景的缩小操作和放大操作。
步骤404,响应于该高度变化信息满足第一高度变化条件,在该虚拟场景界面中,以第二表现形式显示该第二场景画面。
其中,该第二表现形式是二维表现形式和三维表现形式中,除了该第一表现形式之外的另一种表现形式。
在一种可能的实现方式中,上述高度变化信息满足第一高度变化条件,可以包括情况中的至少一种:
1)虚拟相机的高度所在的高度区间的变化满足条件。
在本申请实施例中,当虚拟相机的高度从一个区间变化到另一个区间时,可以触发虚拟场景的场景画面在二维表现形式和三维表现形式之间的转换。
比如,响应于该高度变化信息指示该虚拟相机的高度,从该第一表现形式的高度区间变化至该第二表现形式的高度区间,确定该高度变化信息满足该第一高度变化条件。
在本申请实施例的一个示例性的方案中,虚拟场景界面中的显示对象(或者说是画面内容),与虚拟相机的相机状态相关,而虚拟相机的相机状态,可以由虚拟相机的高度确定。
例如,虚拟场景界面中的显示对象可以包括三种,即虚拟场景的地图、整体的虚拟场景、以及虚拟场景中的某个场景元素(比如虚拟场景中的一座城市、一座山川、一块林地或者一处矿藏等等),也就是说,在不同的虚拟相机的高度下,虚拟相机所拍摄的对象是不同的。
例如,请参考图5至图7,其示出了本申请实施例涉及的虚拟相机的高度与拍摄对象的示意图。如图5所示,当虚拟相机的高度大于9000时,虚拟相机所拍摄的对象可以是虚拟场景的地图51(对应相机状态为地图显示状态);如图6所示,当虚拟相机的高度处于区间[3250,7000]时,虚拟相机所拍摄的对象可以是整体的虚拟场景61(对应相机状态为虚拟场景显示状态);如图7所示,当虚拟相机的高度小于3000时,虚拟相机所拍摄的对象可以是虚拟场景中的某个场景元素71(对应相机状态为场景元素显示状态)。
如图6所示,在本申请实施例中,对于虚拟相机所拍摄的对象是整体的虚拟场景的情况,对相机状态进一步划分,也就是将虚拟场景显示状态划分为二维虚拟场景显示状态和三维虚拟场景显示状态;例如,当虚拟相机的高度处于区间[3250,4500]时,虚拟相机所拍摄的对象可以是三维虚拟场景(对应相机状态为三维虚拟场景显示状态);当虚拟相机的高度处于区间[4700,7000]时,虚拟相机所拍摄的对象可以是二维虚拟场景(对应相机状态为二维虚拟场景显示状态)。
在一种可能的实现方式中,在应用程序中,相机状态可以通过相机状态等级来表示,例如,场景元素显示状态对应相机状态等级1,三维虚拟场景显示状态对应相机状态等级2,二维虚拟场景显示状态对应相机状态等级3,地图显示状态对应相机状态等级4。虚拟相机的高度变化时,相机状态会增序切换或者降序切换。
在本申请实施例中,当虚拟相机所拍摄的对象是整体的虚拟场景时,虚拟相机的高度所处的区间变化,可以触发场景画面的表现形式的切换;例如,当虚拟相机的高度在上述缩放操作的控制下,从区间[3250,4500]增加至区间[4700,7000]内时,触发虚拟场景画面从三维场景画面(第一场景画面),切换至二维场景画面(第二场景画面);反之,当虚拟相机的高度在上述缩放操作的控制下,从区间[4700,7000]降低至区间[3250,4500]内时,触发虚拟场景画面从二维场景画面(第一场景画面),切换至三维场景画面(第二场景画面)。
例如,请参考图8,其示出了本申请实施例涉及的相机高度与表现形式示意图。如图8所示,在策略游戏中,随着玩家在屏幕上执行缩放手势,虚拟相机81会沿着Z轴移动,如果玩家在屏幕做手势缩小操作。虚拟相机81的Z坐标值增大,虚拟相机81的可视范围会逐步扩大,当虚拟相机81的Z坐标进入到2D表现视野时,会自动为玩家将表现形式切换到2D表现形式。反之,用户执行缩小手势,虚拟相机81的Z坐标值变小,虚拟相机81的可视范围缩小,当虚拟相机81的Z坐标进入到3D表现视野时,表现切换成3D表现形式。
虚拟相机2D和3D表现相关的参数可以在应用程序的代码中设置。例如,以CameraZMinValue和CameraZMaxValue分别对应当前表现形式的相机Z轴最大最小值。
当前虚拟相机处于WorldCameraStatLevel2(即上述相机状态等级2)这个状态。如果虚 拟相机的Z轴继续增加,那么当Z值大于当前状态下的CameraMoveMaxValue(即上述4500)这个值的时候,虚拟相机将会切换到WorldCameraStatLevel3(即上述相机状态等级3)这个状态。反向操作同样如此,如果相机的Z值小于相机状态等级3下的CameraMoveMinValue(即上述4700)这个值,虚拟相机的相机状态将从WorldCameraStatLevel3切换到WorldCameraStatLevel2。
每个相机状态对应了相应的表现,比如近景相机,是针对查看主城细节的,也就是上述相机状态等级1。普通3D相机是渲染3D表现的相机,具有和2D场景不同的相机设置,3D场景常用的是透视相机。相机状态等级3通常是战略地图相机状态,使用的是正交相机,在缩放的时候,修改的参数也可以不同。相机状态等级4是世界地图的相机状态,也可以是一个正交相机。
2)虚拟相机的高度变化速率满足条件。
在本申请实施例中,当虚拟相机的高度的变化速率满足一定条件时,可以触发虚拟场景的场景画面在二维表现形式和三维表现形式之间的转换。
例如,当虚拟相机的高度变化速率大于速率阈值,且上述缩放操作控制虚拟相机的高度增加(即上述缩放操作是缩小操作)时,触发虚拟场景的场景画面从三维表现形式向二维表现形式转换;或者,当虚拟相机的高度变化速率大于速率阈值,且上述缩放操作控制虚拟相机的高度降低(即上述缩放操作是放大操作)时,触发虚拟场景的场景画面从二维表现形式向三维表现形式转换。
3)虚拟相机的高度变化值满足条件。
在本申请实施例中,当虚拟相机的高度的变化速率满足一定条件时,可以触发虚拟场景的场景画面在二维表现形式和三维表现形式之间的转换。
例如,当虚拟相机的高度变化值大于高度变化阈值,且上述缩放操作控制虚拟相机的高度增加(即上述缩放操作是缩小操作)时,触发虚拟场景的场景画面从三维表现形式向二维表现形式转换;或者,当虚拟相机的高度变化值大于高度变化阈值,且上述缩放操作控制虚拟相机的高度降低(即上述缩放操作是放大操作)时,触发虚拟场景的场景画面从二维表现形式向三维表现形式转换。
在本申请实施例中,虚拟场景对应的应用程序在该虚拟场景界面中,以第二表现形式显示该虚拟场景的第二场景画面时,可以响应于接收到该缩放操作,激活该第二表现形式的数据资源管理组件;通过该第二表现形式的数据资源管理组件,基于该虚拟相机在该缩放操作之后的高度,在该虚拟场景界面中以该第二表现形式显示该第二场景画面。
在一种可能的实现方式中,虚拟场景对应的应用程序还可以控制该第一表现形式的数据资源管理组件转入非激活状态;并销毁该第一表现形式的数据资源管理组件管理的数据资源。
在本申请实施例中,虚拟场景对应的应用程序在启动时,可以启动两个数据资源管理组件,分别对应2D表现形式和3D表现形式,并且,这两个数据资源管理组件中的一个处于激活状态,用于显示虚拟场景对应的场景画面。此外,由于两种表现形式的数据资源并不通用,因此,在一个数据资源管理组件处于激活状态时,为了节约内存资源,可以将另一个未激活状态的数据资源管理组件管理的数据资源销毁。
请参考图9,其示出了本申请实施例涉及的一种常见的显示模型示意图。如图9所示,在常见的显示模型90中,根据当前虚拟相机所见区域加载模型并显示,最终交由图形处理器绘制到屏幕显示。
请参考图10,其示出了本申请实施例涉及的显示模型示意图。在该方案中,由于同时支持两种表现形式的切换,因此重新设计了显示模型。首先强化viewport(视窗1001)的功能,即视窗会根据虚拟相机当前的位置计算出玩家所有可见到的地图网格。计算之后可以不对网格内容做任何逻辑处理,而是会将这个数据继续传递到数据资源管理组件层进行操作。
如图10所示,在虚拟相机切换状态时,会修改虚拟相机的状态,比如从3D相机状态切 换到2D相机状态,此时可以注销掉当前的3D虚拟场景的显示(即注销3D表现形式对应的数据资源管理组件1002),然后执行2D的虚拟场景的载入(即激活2D表现形式对应的数据资源管理组件1003),之后所有的表现都会在2D的数据资源管理组件中执行,并交由图形处理器渲染,最终显示到屏幕,反之亦然。
在一种可能的实现方式中,响应于该第一表现形式的数据资源管理组件保持在非激活状态的时长达到第一时长阈值,销毁该第一表现形式的数据资源管理组件管理的数据资源。
用户在使用虚拟场景对应的应用程序的过程中,可能会在短时间内,在两种表现形式的场景画面之间频繁切换,相应的,虚拟场景对应的应用程序也需要反复加载和销毁数据资源,从而影响显示效果,比如,频繁造成卡顿。
对于这种情况,在本申请实施例中,虚拟场景对应的应用程序在控制场景画面在2D和3D之间切换后,可以在一段时间内保留切换前的数据资源,如果用户在短时间内又切换回之前的表现形式,则可以避免数据资源的重复加载和销毁,如果一段时间之后用户未切换回之前的表现形式,则将之前的数据资源销毁,以节约内存空间。
在一种可能的实现方式中,在激活该第二表现形式的数据资源管理组件之前,虚拟场景对应的应用程序还可以响应于该高度变化信息满足第二高度变化条件,预加载该第二表现形式对应的数据资源管理组件管理的数据资源;其中,该第二高度变化条件包括:该高度变化信息指示该虚拟相机的高度处于该第一表现形式的高度区间内,且该虚拟相机的高度与该第二表现形式的高度区间之间的最小高度距离小于距离阈值。
由于场景画面的表现形式在2D和3D之间切换时,需要进行数据资源管理组件的激活,以及数据资源的加载,这会产生一定的时延,从而影响画面切换的流畅性。
对于上述问题,在本申请实施例中,可以实行数据资源的预加载,来减少不同表现形式的画面切换之间的时延。例如,当虚拟相机的高度处于当前相机状态所在的高度区间内(比如处于2D对应的高度区间[4700,7000]内),但是又接近另一相机状态所在的高度区间(比如,相机高度为4800,接近3D对应的高度区间[3250,4500]),此时,虚拟场景对应的应用程序可以预加载3D数据资源管理组件管理的数据资源,以降低数据加载对画面切换造成的时延,提高流畅性。
在一种可能的实现方式中,该第二高度变化条件还包括:该高度变化信息指示该虚拟相机的高度向该第二表现形式的高度区间变化。
由于预加载资源数据会占用一部分内存资源,为了避免不必要的预加载过程,在本申请实施例中,虚拟场景对应的应用程序还可以结合虚拟相机的高度变化的方向,来确定是否预加载。例如,当高度变化信息指示该虚拟相机的高度向该第二表现形式的高度区间变化时,表示可能即将要切换到第二表现形式,此时执行预加载;反之,如果高度变化信息指示该虚拟相机的高度向该第二表现形式的高度区间的相反方向变化,则表示不会切换到第二表现形式,此时不执行预加载。
在一种可能的实现方式中,在通过该第二表现形式的数据资源管理组件,基于该虚拟相机在该缩放操作之后的高度,在该虚拟场景界面中以该第二表现形式显示该第二场景画面时,可以基于该虚拟相机在该缩放操作之后的高度,确定该虚拟场景中对用户可见的目标区块;通过该第二表现形式的数据资源管理组件,在静态数据中加载与该目标区块对应的,该第二表现形式的目标数据资源;基于该目标数据资源,在该虚拟场景界面中以该第二表现形式显示该第二场景画面。
在虚拟场景的制作过程中,美术人员会生成虚拟场景显示所需要的所有数据。请参考图11,其示出了本申请实施例涉及的虚拟场景数据配置示意图。如图11所示,美术人员构建虚拟场景(S1101),生成虚拟场景对应的静态数据(S1102),然后将全部的静态数据按照虚拟场景进行切块压缩存储(S1103),每块压缩数据对应虚拟场景中一个区块。
在美术侧制作完游戏场景之后,由于同时存在两种表现形式的数据,需要对各种表现形 式的数据进行二次处理,包括数据索引,资源分类,为之后的运行时资源加载和表现渲染提供离线静态数据。
在此基础上,需要解决由于两个表现形式的数据量增大的问题,本申请所示的方案采用了分块存储的方式,请参考图12,其示出了本申请实施例涉及的一种场景切块示意图。如图12所示,可以将虚拟场景按照地图1201切分成大小相等的区块1202。
之后将分块数据进行序列化成二进制文件,并压缩存储。这样就可以解决运行时静态数据在内存中消耗过高的问题,运行时根据玩家视窗所在区域反向操作之前的数据。请参考图13,其示出了本申请实施例涉及的静态数据加载示意图。如图13所示,在虚拟相机的高度发生变化时,视窗计算出对用户可视区域覆盖的目标区块(S1301),判断已有的静态数据是否可用(S1302),即判断静态数据中是否包含目标区块对应的数据资源,若是,则直接使用静态数据进行画面显示(S1303),否则,加载目标区块对应的压缩文件(S1304),解压缩(S1305)后进行反序列化(S1306),并添加至静态数据,并使用静态数据进行画面显示。
在一种可能的实现方式中,响应于该静态数据中包含该目标数据资源之外的其它资源,将该其它资源从该静态数据中删除。
在本申请实施例中,为了节约内存资源,对于显示当前画面的目标数据资源之外的其它数据资源,虚拟场景的应用程序可以将这部分数据资源删除。
在一种可能的实现方式中,响应于该其它资源未被使用的时长达到第二时长阈值,将该其它资源从该静态数据中删除。
在本申请实施例中,为了避免用户在短时间内来回调整虚拟相机的高度而导致相同的数据资源被反复删除和加载的情况,虚拟场景的应用程序在删除静态数据中未被使用的数据资源时,可以将静态数据中未被使用的时长达到第二时长阈值的数据删除,而未被使用的时长没有达到第二时长阈值的数据则继续保留。
在一种可能的实现方式中,上述第一表现形式的高度区间,以及该第二表现形式的高度区间,可以是开发人员预先设置的,或者,由用户预先设置的。
在一种可能的实现方式中,虚拟场景的应用程序可以获取显示该虚拟场景界面的终端的性能参数,该性能参数用于指示该终端的图形显示性能;基于该性能参数,获取高度区间划分信息;该高度区间划分信息包括该第一表现形式的高度区间,以及该第二表现形式的高度区间。
在本申请实施例中,为了兼顾不同性能的终端的虚拟场景显示效果,虚拟场景的应用程序可以针对不同性能的终端,确定不同的高度区间划分信息。例如,对于图形显示性能较高的终端,虚拟场景的应用程序可以设置较为宽泛的三维表现形式的高度区间,比如[3250,5500],而对于图形显示性能较低的终端,虚拟场景的应用程序可以设置较为窄的三维表现形式的高度区间,比如[3250,4000]。
在一种可能的实现方式中,该第一表现形式为二维表现形式,该第二表现形式为三维表现形式,该缩放操作是对该虚拟场景的放大操作。
例如,请参考图14,其示出了本申请实施例涉及的一种虚拟场景放大示意图。虚拟场景的应用程序可以显示虚拟场景界面,该虚拟场景界面用于显示虚拟场景的场景画面;在该虚拟场景界面中,以二维表现形式显示该虚拟场景的第一场景画面1401;响应于接收到对该虚拟场景的放大操作,且放大后的该虚拟场景的场景画面的视野范围小于范围阈值,以三维表现形式显示该虚拟场景的第二场景画面1402。
在另一种可能的实现方式中,第一表现形式为三维表现形式,该第二表现形式为二维表现形式,该缩放操作是对该虚拟场景的缩小操作。
例如,请参考图15,其示出了本申请实施例涉及的一种虚拟场景缩小示意图。虚拟场景的应用程序可以显示虚拟场景界面,该虚拟场景界面用于显示虚拟场景的场景画面;在该虚拟场景界面中,以三维表现形式显示该虚拟场景的第一场景画面1501;响应于接收到对该虚 拟场景的缩小操作,且缩小后的该虚拟场景的场景画面的视野范围大于范围阈值,以二维表现形式显示该虚拟场景的第二场景画面1502。
综上所述,本申请实施例所示的方案,在虚拟场景界面中以二维表现形式或三维表现形式显示场景画面的情况下,可以在对虚拟场景的缩放操作的触发下,将虚拟场景的场景画面切换至二维表现形式和三维表现形式中的另一种表现形式;上述过程中,不需要用户退出场景画面进行设置,只需要复用对虚拟场景的缩放操作,即可以实现对场景画面的表现形式的灵活切换,从而显著的降低用户操作过程的复杂度,提高了虚拟场景的表现形式的切换效率。
图16是本申请一个示例性实施例提供的虚拟场景显示装置的结构框图,该装置可以用于执行如图3或图4所示的方法中的全部或者部分步骤,该装置包括:
界面显示模块1601,用于显示虚拟场景界面,所述虚拟场景界面用于显示虚拟场景的场景画面;
第一画面显示模块1602,用于在所述虚拟场景界面中,以第一表现形式显示所述虚拟场景的第一场景画面;所述第一表现形式是二维表现形式或者三维表现形式;
第二画面显示模块1603,用于响应于接收到对所述虚拟场景的缩放操作,在所述虚拟场景界面中,以第二表现形式显示所述虚拟场景的第二场景画面;所述第二表现形式是二维表现形式和三维表现形式中,除了所述第一表现形式之外的另一种表现形式。
在一种可能的实现方式中,所述第二画面显示模块1603,包括:
信息获取子模块,用于响应于接收到所述缩放操作,获取虚拟相机在所述缩放操作前后的高度变化信息;所述虚拟相机用于采集所述虚拟场景的场景画面;所述虚拟相机的高度用于控制所述虚拟场景的场景画面的视野范围;所述虚拟相机的高度,用于指示所述虚拟相机与所述虚拟场景在同一个三维坐标系中的垂直坐标系上的距离;
显示子模块,用于响应于所述高度变化信息满足第一高度变化条件,在所述虚拟场景界面中,以第二表现形式显示所述第二场景画面。
在一种可能的实现方式中,所述第二画面显示模块1603,还包括:
条件确定子模块,用于响应于所述高度变化信息指示所述虚拟相机的高度,从所述第一表现形式的高度区间变化至所述第二表现形式的高度区间,确定所述高度变化信息满足所述第一高度变化条件。
在一种可能的实现方式中,所述第二画面显示模块1603,用于,
响应于接收到所述缩放操作,激活所述第二表现形式的数据资源管理组件;
通过所述第二表现形式的数据资源管理组件,基于所述虚拟相机在所述缩放操作之后的高度,在所述虚拟场景界面中以所述第二表现形式显示所述第二场景画面。
在一种可能的实现方式中,所述装置还包括:
状态控制模块,用于控制所述第一表现形式的数据资源管理组件转入非激活状态;
数据资源销毁模块,用于销毁所述第一表现形式的数据资源管理组件管理的数据资源。
在一种可能的实现方式中,所述数据资源销毁模块,用于响应于所述第一表现形式的数据资源管理组件保持在非激活状态的时长达到第一时长阈值,销毁所述第一表现形式的数据资源管理组件管理的数据资源。
在一种可能的实现方式中,所述装置还包括:
预加载模块,用于响应于所述高度变化信息满足第二高度变化条件,预加载所述第二表现形式的数据资源管理组件管理的数据资源;
其中,所述第二高度变化条件包括:所述高度变化信息指示所述虚拟相机的高度处于所述第一表现形式的高度区间内,且所述虚拟相机的高度与所述第二表现形式的高度区间之间的最小高度距离小于距离阈值。
在一种可能的实现方式中,所述第二高度变化条件还包括:所述高度变化信息指示所述 虚拟相机的高度向所述第二表现形式的高度区间变化。
在一种可能的实现方式中,所述第二画面显示模块1603,用于,
基于所述虚拟相机在所述缩放操作之后的高度,确定所述虚拟场景中对用户可见的目标区块;
通过所述第二表现形式的数据资源管理组件,在静态数据中加载与所述目标区块对应的,所述第二表现形式的目标数据资源;
基于所述目标数据资源,在所述虚拟场景界面中以所述第二表现形式显示所述第二场景画面。
在一种可能的实现方式中,所述装置还包括:
数据删除模块,用于响应于所述静态数据中包含所述目标数据资源之外的其它资源,将所述其它资源从所述静态数据中删除。
在一种可能的实现方式中,所述数据删除模块,用于响应于所述其它资源未被使用的时长达到第二时长阈值,将所述其它资源从所述静态数据中删除。
在一种可能的实现方式中,所述装置还包括:
性能参数获取模块,用于获取显示所述虚拟场景界面的终端的性能参数,所述性能参数用于指示所述终端的图形显示性能;
区间划分信息获取模块,用于基于所述性能参数,获取高度区间划分信息;所述高度区间划分信息包括所述第一表现形式的高度区间,以及所述第二表现形式的高度区间。
在一种可能的实现方式中,所述第一表现形式为二维表现形式,所述第二表现形式为三维表现形式,所述缩放操作是对所述虚拟场景的放大操作;
或者,
所述第一表现形式为三维表现形式,所述第二表现形式为二维表现形式,所述缩放操作是对所述虚拟场景的缩小操作。
综上所述,本申请实施例所示的方案,在虚拟场景界面中以二维表现形式或三维表现形式显示场景画面的情况下,可以在对虚拟场景的缩放操作的触发下,将虚拟场景的场景画面切换至二维表现形式和三维表现形式中的另一种表现形式;上述过程中,不需要用户退出场景画面进行设置,只需要复用对虚拟场景的缩放操作,即可以实现对场景画面的表现形式的灵活切换,从而显著的降低用户操作过程的复杂度,提高了虚拟场景的表现形式的切换效率。
图17是根据一示例性实施例示出的计算机设备1700的结构框图。该计算机设备1700可以是用户终端,比如智能手机、平板电脑、MP3播放器(Moving Picture Experts Group Audio Layer III,动态影像专家压缩标准音频层面3)、MP4(Moving Picture Experts Group Audio Layer IV,动态影像专家压缩标准音频层面4)播放器、笔记本电脑或台式电脑。计算机设备1700还可能被称为用户设备、便携式终端、膝上型终端、台式终端等其他名称。
通常,计算机设备1700包括有:处理器1701和存储器1702。
处理器1701可以包括一个或多个处理核心,比如4核心处理器、8核心处理器等。处理器1701可以采用DSP(Digital Signal Processing,数字信号处理)、FPGA(Field-Programmable Gate Array,现场可编程门阵列)、PLA(Programmable Logic Array,可编程逻辑阵列)中的至少一种硬件形式来实现。
存储器1702可以包括一个或多个计算机可读存储介质,该计算机可读存储介质可以是非暂态的。存储器1702还可包括高速随机存取存储器,以及非易失性存储器,比如一个或多个磁盘存储设备、闪存存储设备。在一些实施例中,存储器1702中的非暂态的计算机可读存储介质用于存储至少一个计算机程序,该至少一个计算机程序用于被处理器1701所执行以实现本申请中方法实施例提供的方法中的全部或者部分步骤。
在一些实施例中,计算机设备1700还可选包括有:外围设备接口1703和至少一个外围 设备。处理器1701、存储器1702和外围设备接口1703之间可以通过总线或信号线相连。各个外围设备可以通过总线、信号线或电路板与外围设备接口1703相连。具体地,外围设备包括:射频电路1704、显示屏1705、摄像头组件1706、音频电路1707和电源1709中的至少一种。
在一些实施例中,计算机设备1700还包括有一个或多个传感器1710。该一个或多个传感器1710包括但不限于:加速度传感器1711、陀螺仪传感器1712、压力传感器1713、光学传感器1715以及接近传感器1716。
本领域技术人员可以理解,图17中示出的结构并不构成对计算机设备1700的限定,可以包括比图示更多或更少的组件,或者组合某些组件,或者采用不同的组件布置。
在一示例性实施例中,还提供了一种包括指令的非临时性计算机可读存储介质,例如包括至少一条计算机程序的存储器,上述至少一条计算机程序可由处理器执行以完成上述图3或图4对应实施例所示的方法的全部或者部分步骤。例如,所述非临时性计算机可读存储介质可以是ROM(Read-Only Memory,只读存储器)、随机存取存储器(Random Access Memory,RAM)、CD-ROM(Compact Disc Read-Only Memory,只读光盘)、磁带、软盘和光数据存储设备等。
根据本申请的一个方面,提供了一种计算机程序产品或计算机程序,该计算机程序产品或计算机程序包括计算机指令,该计算机指令存储在计算机可读存储介质中。计算机设备的处理器从计算机可读存储介质读取该计算机指令,处理器执行该计算机指令,使得该计算机设备执行上述方面的各种可选实现方式中提供的方法。
本领域技术人员在考虑说明书及实践这里公开的发明后,将容易想到本申请的其它实施方案。本申请旨在涵盖本申请的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本申请的一般性原理并包括本申请未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本申请的真正范围和精神由下面的权利要求指出。
应当理解的是,本申请并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本申请的范围仅由所附的权利要求来限制。

Claims (20)

  1. 一种虚拟场景显示方法,所述方法由计算机设备执行,所述方法包括:
    显示虚拟场景界面,所述虚拟场景界面用于显示虚拟场景的场景画面;
    在所述虚拟场景界面中,以第一表现形式显示所述虚拟场景的第一场景画面;所述第一表现形式是二维表现形式或者三维表现形式;
    响应于接收到对所述虚拟场景的缩放操作,在所述虚拟场景界面中,以第二表现形式显示所述虚拟场景的第二场景画面;所述第二表现形式是二维表现形式和三维表现形式中,除了所述第一表现形式之外的另一种表现形式。
  2. 根据权利要求1所述的方法,所述响应于接收到对所述虚拟场景的缩放操作,在所述虚拟场景界面中,以第二表现形式显示所述虚拟场景的第二场景画面,包括:
    响应于接收到所述缩放操作,获取虚拟相机在所述缩放操作前后的高度变化信息;所述虚拟相机用于采集所述虚拟场景的场景画面;所述虚拟相机的高度用于控制所述虚拟场景的场景画面的视野范围;所述虚拟相机的高度,用于指示所述虚拟相机与所述虚拟场景在同一个三维坐标系中的垂直坐标系上的距离;
    响应于所述高度变化信息满足第一高度变化条件,在所述虚拟场景界面中,以第二表现形式显示所述第二场景画面。
  3. 根据权利要求2所述的方法,所述在所述虚拟场景界面中,以第二表现形式显示所述第二场景画面之前,还包括:
    响应于所述高度变化信息指示所述虚拟相机的高度,从所述第一表现形式的高度区间变化至所述第二表现形式的高度区间,确定所述高度变化信息满足所述第一高度变化条件。
  4. 根据权利要求2所述的方法,所述响应于接收到对所述虚拟场景的缩放操作,在所述虚拟场景界面中,以第二表现形式显示所述虚拟场景的第二场景画面,包括:
    响应于接收到所述缩放操作,激活所述第二表现形式的数据资源管理组件;
    通过所述第二表现形式的数据资源管理组件,基于所述虚拟相机在所述缩放操作之后的高度,在所述虚拟场景界面中以所述第二表现形式显示所述第二场景画面。
  5. 根据权利要求4所述的方法,所述方法还包括:
    控制所述第一表现形式的数据资源管理组件转入非激活状态;
    销毁所述第一表现形式的数据资源管理组件管理的数据资源。
  6. 根据权利要求4所述的方法,所述激活所述第二表现形式的数据资源管理组件之前,还包括:
    响应于所述高度变化信息满足第二高度变化条件,预加载所述第二表现形式的数据资源管理组件管理的数据资源。
  7. 根据权利要求6所述的方法,所述第二高度变化条件包括:所述高度变化信息指示所述虚拟相机的高度处于所述第一表现形式的高度区间内,且所述虚拟相机的高度与所述第二表现形式的高度区间之间的最小高度距离小于距离阈值。
  8. 根据权利要求7所述的方法,所述第二高度变化条件还包括:所述高度变化信息指示所述虚拟相机的高度向所述第二表现形式的高度区间变化。
  9. 根据权利要求4所述的方法,所述通过所述第二表现形式的数据资源管理组件,基于所述虚拟相机在所述缩放操作之后的高度,在所述虚拟场景界面中以所述第二表现形式显示所述第二场景画面,包括:
    基于所述虚拟相机在所述缩放操作之后的高度,确定所述虚拟场景中对用户可见的目标区块;
    通过所述第二表现形式的数据资源管理组件,在静态数据中加载与所述目标区块对应的,所述第二表现形式的目标数据资源;
    基于所述目标数据资源,在所述虚拟场景界面中以所述第二表现形式显示所述第二场景画面。
  10. 根据权利要求3所述的方法,所述方法还包括:
    获取显示所述虚拟场景界面的终端的性能参数,所述性能参数用于指示所述终端的图形显示性能;
    基于所述性能参数,获取高度区间划分信息;所述高度区间划分信息包括所述第一表现形式的高度区间,以及所述第二表现形式的高度区间。
  11. 根据权利要求1至10任一所述的方法,
    所述第一表现形式为二维表现形式,所述第二表现形式为三维表现形式,所述缩放操作是对所述虚拟场景的放大操作;
    或者,
    所述第一表现形式为三维表现形式,所述第二表现形式为二维表现形式,所述缩放操作是对所述虚拟场景的缩小操作。
  12. 一种虚拟场景显示方法,所述方法由计算机设备执行,所述方法包括:
    显示虚拟场景界面,所述虚拟场景界面用于显示虚拟场景的场景画面;
    在所述虚拟场景界面中,以二维表现形式显示所述虚拟场景的第一场景画面;
    响应于接收到对所述虚拟场景的放大操作,且放大后的所述虚拟场景的场景画面的视野范围小于范围阈值,以三维表现形式显示所述虚拟场景的第二场景画面。
  13. 一种虚拟场景显示方法,所述方法由计算机设备执行,所述方法包括:
    显示虚拟场景界面,所述虚拟场景界面用于显示虚拟场景的场景画面;
    在所述虚拟场景界面中,以三维表现形式显示所述虚拟场景的第一场景画面;
    响应于接收到对所述虚拟场景的缩小操作,且缩小后的所述虚拟场景的场景画面的视野范围大于范围阈值,以二维表现形式显示所述虚拟场景的第二场景画面。
  14. 一种虚拟场景显示装置,所述装置包括:
    界面显示模块,用于显示虚拟场景界面,所述虚拟场景界面用于显示虚拟场景的场景画面;
    第一画面显示模块,用于在所述虚拟场景界面中,以第一表现形式显示所述虚拟场景的第一场景画面;所述第一表现形式是二维表现形式或者三维表现形式;
    第二画面显示模块,用于响应于接收到对所述虚拟场景的缩放操作,在所述虚拟场景界面中,以第二表现形式显示所述虚拟场景的第二场景画面;所述第二表现形式是二维表现形式和三维表现形式中,除了所述第一表现形式之外的另一种表现形式。
  15. 根据权利要求14所述的装置,所述第二画面显示模块,包括:
    信息获取子模块,用于响应于接收到所述缩放操作,获取虚拟相机在所述缩放操作前后 的高度变化信息;所述虚拟相机用于采集所述虚拟场景的场景画面;所述虚拟相机的高度用于控制所述虚拟场景的场景画面的视野范围;所述虚拟相机的高度,用于指示所述虚拟相机与所述虚拟场景在同一个三维坐标系中的垂直坐标系上的距离;
    显示子模块,用于响应于所述高度变化信息满足第一高度变化条件,在所述虚拟场景界面中,以第二表现形式显示所述第二场景画面。
  16. 根据权利要求15所述的装置,所述第二画面显示模块,还包括:
    条件确定子模块,用于响应于所述高度变化信息指示所述虚拟相机的高度,从所述第一表现形式的高度区间变化至所述第二表现形式的高度区间,确定所述高度变化信息满足所述第一高度变化条件。
  17. 根据权利要求15所述的装置,所述第二画面显示模块,用于,
    响应于接收到所述缩放操作,激活所述第二表现形式的数据资源管理组件;
    通过所述第二表现形式的数据资源管理组件,基于所述虚拟相机在所述缩放操作之后的高度,在所述虚拟场景界面中以所述第二表现形式显示所述第二场景画面。
  18. 一种计算机设备,计算机设备包含处理器和存储器,所述存储器中存储由至少一条计算机程序,所述至少一条计算机程序由所述处理器加载并执行以实现如权利要求1至13任一所述的虚拟场景显示方法。
  19. 一种计算机可读存储介质,所述存储介质中存储有至少一条计算机程序,所述至少一条计算机程序由处理器加载并执行以实现如权利要求1至13任一所述的虚拟场景显示方法。
  20. 一种计算机程序产品,所述计算机程序产品包括计算机指令,所述计算机指令存储在计算机可读存储介质中;所述计算机指令由处理器加载并执行,以实现如权利要求1至13任一所述的虚拟场景显示方法。
PCT/CN2022/072363 2021-01-25 2022-01-17 虚拟场景显示方法、装置、设备、存储介质及程序产品 WO2022156639A1 (zh)

Priority Applications (3)

Application Number Priority Date Filing Date Title
EP22742118.7A EP4180099A4 (en) 2021-01-25 2022-01-17 METHOD, APPARATUS AND DEVICE FOR DISPLAYING VIRTUAL SCENES, STORAGE MEDIUM AND PROGRAM PRODUCT
KR1020237020044A KR20230104967A (ko) 2021-01-25 2022-01-17 가상 장면 디스플레이 방법, 장치 및 디바이스, 저장 매체, 및 프로그램 제품
US17/975,516 US20230048826A1 (en) 2021-01-25 2022-10-27 Virtual scene display method and apparatus, device, storage medium, and program product

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110097445.6 2021-01-25
CN202110097445.6A CN112717381B (zh) 2021-01-25 2021-01-25 虚拟场景展示方法、装置、计算机设备及存储介质

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US17/975,516 Continuation US20230048826A1 (en) 2021-01-25 2022-10-27 Virtual scene display method and apparatus, device, storage medium, and program product

Publications (1)

Publication Number Publication Date
WO2022156639A1 true WO2022156639A1 (zh) 2022-07-28

Family

ID=75595274

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/072363 WO2022156639A1 (zh) 2021-01-25 2022-01-17 虚拟场景显示方法、装置、设备、存储介质及程序产品

Country Status (5)

Country Link
US (1) US20230048826A1 (zh)
EP (1) EP4180099A4 (zh)
KR (1) KR20230104967A (zh)
CN (1) CN112717381B (zh)
WO (1) WO2022156639A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112717381B (zh) * 2021-01-25 2022-11-25 腾讯科技(深圳)有限公司 虚拟场景展示方法、装置、计算机设备及存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102467756A (zh) * 2010-10-29 2012-05-23 国际商业机器公司 用于三维场景的透视方法及装置
CN111142669A (zh) * 2019-12-28 2020-05-12 上海米哈游天命科技有限公司 二维界面到三维场景的交互方法、装置、设备及存储介质
US20200388070A1 (en) * 2018-07-05 2020-12-10 Tencent Technology (Shenzhen) Company Limited Virtual scene switching method and apparatus, terminal device, and storage medium
CN112717381A (zh) * 2021-01-25 2021-04-30 腾讯科技(深圳)有限公司 虚拟场景展示方法、装置、计算机设备及存储介质

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9135751B2 (en) * 2012-06-05 2015-09-15 Apple Inc. Displaying location preview
US9111380B2 (en) * 2012-06-05 2015-08-18 Apple Inc. Rendering maps
CN104463948B (zh) * 2014-09-22 2017-05-17 北京大学 三维虚拟现实系统与地理信息系统的无缝可视化方法
CN105381611A (zh) * 2015-11-19 2016-03-09 网易(杭州)网络有限公司 一种2d游戏场景分层实现立体表现的方法及装置
US11217006B2 (en) * 2018-10-29 2022-01-04 Verizon Patent And Licensing Inc. Methods and systems for performing 3D simulation based on a 2D video image

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102467756A (zh) * 2010-10-29 2012-05-23 国际商业机器公司 用于三维场景的透视方法及装置
US20200388070A1 (en) * 2018-07-05 2020-12-10 Tencent Technology (Shenzhen) Company Limited Virtual scene switching method and apparatus, terminal device, and storage medium
CN111142669A (zh) * 2019-12-28 2020-05-12 上海米哈游天命科技有限公司 二维界面到三维场景的交互方法、装置、设备及存储介质
CN112717381A (zh) * 2021-01-25 2021-04-30 腾讯科技(深圳)有限公司 虚拟场景展示方法、装置、计算机设备及存储介质

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP4180099A4 *

Also Published As

Publication number Publication date
KR20230104967A (ko) 2023-07-11
EP4180099A4 (en) 2024-03-13
US20230048826A1 (en) 2023-02-16
EP4180099A1 (en) 2023-05-17
CN112717381B (zh) 2022-11-25
CN112717381A (zh) 2021-04-30

Similar Documents

Publication Publication Date Title
WO2021218516A1 (zh) 虚拟对象控制方法、装置、设备及存储介质
CN112156464B (zh) 虚拟对象的二维形象展示方法、装置、设备及存储介质
CN111603771B (zh) 动画生成方法、装置、设备及介质
WO2022134980A1 (zh) 虚拟对象的控制方法、装置、终端及存储介质
CN111589130B (zh) 虚拟场景中的虚拟对象控制方法、装置、设备及存储介质
WO2019109778A1 (zh) 游戏对局结果的展示方法、装置及终端
JP7250403B2 (ja) 仮想シーンの表示方法、装置、端末及びコンピュータプログラム
CN112569596B (zh) 视频画面展示方法、装置、计算机设备及存储介质
KR102656970B1 (ko) 가상 객체 선택 방법 및 장치, 디바이스, 및 저장 매체
WO2022105552A1 (zh) 虚拟场景中的信息处理方法、装置、设备、介质及程序产品
CN112870699B (zh) 虚拟环境中的信息显示方法、装置、设备及介质
WO2021218460A1 (zh) 虚拟对象的控制方法、装置、终端及存储介质
CN113952720A (zh) 游戏场景渲染方法、装置、电子设备及存储介质
WO2021196917A9 (zh) 游戏应用程序中的帧显示方法、装置、终端和存储介质
WO2021244306A1 (zh) 虚拟对象的选择方法、装置、设备及存储介质
WO2022156639A1 (zh) 虚拟场景显示方法、装置、设备、存储介质及程序产品
WO2022257692A1 (zh) 虚拟场景变换方法、装置、设备、存储介质及程序产品
JP2024509064A (ja) 位置マークの表示方法及び装置、機器並びにコンピュータプログラム
TWI803224B (zh) 聯絡人信息展示方法、裝置、電子設備、計算機可讀儲存媒體及計算機程式産品
CN110860087A (zh) 虚拟对象控制方法、装置及存储介质
TW202247879A (zh) 信息顯示方法、裝置、終端及儲存媒體
JP2024001280A (ja) 仮想オブジェクトを選択するための方法並びにその、装置、端末及び記憶媒体
CN112675538A (zh) 数据同步方法、装置、设备及介质
WO2024078225A1 (zh) 虚拟对象的显示方法、装置、设备及存储介质
CN112717413B (zh) 横版关卡画面的显示方法、装置、设备及介质

Legal Events

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

Ref document number: 22742118

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2022742118

Country of ref document: EP

Effective date: 20230207

ENP Entry into the national phase

Ref document number: 20237020044

Country of ref document: KR

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE