Virtual scene display method and device, storage medium and electronic equipment

In the virtual scene display method, by using virtual lenses and automatic scaling components to switch scenes according to the human eye position, the problems of low scene switching efficiency and low accuracy in the prior art are solved, and more efficient and accurate scene switching effects are achieved .

CN119206140APending Publication Date: 2024-12-27BOE TECHNOLOGY GROUP CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202310764162.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-06-26
Publication Date
2024-12-27

AI Technical Summary

Technical Problem

The existing virtual scene display method cannot change the scene according to the change of the human eye position, resulting in low efficiency and low accuracy of scene switching.

Method used

By displaying the picture of the virtual lens bound to the currently controlled object on the display interface at the first scene position, and determining the second scene position that the virtual lens needs to be switched based on the current human eye position coordinates, calculating the lens switching trajectory, and using automatic scaling The component switches the virtual lens from the first scene position to the second scene position, and finally replaces the first scene picture with the picture taken at the second scene position.

Benefits of technology

Scene switching based on human eye position is realized, the efficiency and accuracy of scene switching are improved, and the user experience is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119206140A_ABST
    Figure CN119206140A_ABST
Patent Text Reader

Abstract

The embodiment of the invention relates to a virtual scene display method and device, a storage medium and electronic equipment, and relates to the technical field of computers.The method comprises the steps that a first scene picture which is shot at a first scene position through a virtual lens bound in a current controlled object and comprises a current observed object is displayed on a display interface; determining a second scene position needing to be switched by the virtual lens according to the current human eye position coordinate at the current moment, and determining a lens switching track of the virtual lens according to the first scene position and the second scene position; switching the virtual lens from a first scene position to a second scene position based on the lens switching track and an automatic telescopic component bound in the current controlled object; and replacing the first scene picture based on a second scene picture which is shot by the virtual lens at a second scene position and comprises a target observed object. According to the invention, the switching efficiency of the scene picture is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Background Art

[0002] In the existing virtual scene display method, it is impossible to change the scene according to the change of the human eye position, thereby reducing the switching efficiency of the scene screen and the accuracy of the scene switching result.

[0003] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention

[0004] The purpose of the present disclosure is to provide a method for displaying a virtual scene, a display device for a virtual scene, a computer-readable storage medium, and an electronic device, thereby overcoming the problem of low scene switching efficiency caused by the limitations and defects of related technologies to at least a certain extent.

[0005] According to one aspect of the present disclosure, a method for displaying a virtual scene is provided, comprising:

[0006] Displaying on the display interface a first scene image including the currently observed object, shot at the first scene position by a virtual lens bound to the currently controlled object;

[0007] Determining the second scene position to which the virtual lens needs to switch according to the current human eye position coordinates at the current moment, and determining the lens switching trajectory of the virtual lens according to the first scene position and the second scene position;

[0008] Based on the lens switching trajectory and the automatic telescopic component bound to the current controlled object, the virtual lens is switched from the first scene position to the second scene position;

[0009] The first scene picture is replaced based on a second scene picture including a target observed object shot by the virtual lens at a second scene position.

[0010] In an exemplary embodiment of the present disclosure, the currently controlled object is a controlled model body, and the currently controlled object is a virtual object controlled by a current user;

[0011] The movement trajectory of the currently controlled object in the virtual scene is determined by the eye position coordinates of the current user's eyes on the display interface at different moments;

[0012] The virtual lens includes a third-person lens, and the third-person lens is bound to the origin position of the current controlled object, and the origin position is used as the third lens anchor point.

[0013] In an exemplary embodiment of the present disclosure, the method for displaying a virtual scene further includes:

[0014] Embedding an integrated virtual grid in a game engine to obtain a current controlled object, and binding an observed object to the current controlled object; wherein the observed object includes the current observed object and / or the target observed object;

[0015] A virtual lens and an automatic telescopic component are configured for the currently controlled object; wherein a first position level where the automatic telescopic component is located is higher than a second position level where the virtual lens is located;

[0016] A virtual lens is bound at the origin position of the currently controlled object, so as to shoot a scene picture including the observed object through the virtual lens.

[0017] In an exemplary embodiment of the present disclosure, a first scene picture including a currently observed object shot at a first scene position by a virtual lens bound to a currently controlled object is displayed on a display interface, including:

[0018] Acquire first posture information and first viewing angle information of the virtual lens bound to the currently controlled object at a first scene position; wherein the first posture information includes first offset posture information and / or first focal length information, and the first viewing angle information includes first field of view angle information and / or first pitch angle information;

[0019] In a first posture corresponding to the first offset posture information and / or the first focal length information, a first scene picture including the currently observed object that can be photographed by the currently controlled object at a first viewing angle corresponding to the first field of view angle information and / or the first pitch angle information is collected, and the first scene picture is displayed on the display interface;

[0020] The first scene position includes a first default scene position and / or a scene position where the historical eye position coordinates of the current user at a previous moment corresponding to the current moment are located.

[0021] In an exemplary embodiment of the present disclosure, determining the second scene position to which the virtual lens needs to switch according to the current eye position coordinates at the current moment includes:

[0022] Capturing a current eye image of the current user at the current moment through a camera module, and determining a first gaze position and a first gaze azimuth of the eyes of the current user in the display interface at the current moment according to the current eye image;

[0023] Based on the first gaze position and the first gaze azimuth, determining current eye position coordinates of the current user's eyes on the display interface at a current moment;

[0024] The second scene position to which the virtual lens needs to switch is determined according to the current human eye position coordinates.

[0025] In an exemplary embodiment of the present disclosure, determining the second scene position to which the virtual lens needs to switch according to the current human eye position coordinates includes:

[0026] Acquire the scale coordinates between the current virtual scene and the real scene, and perform a scale geometric transformation on the current eye position coordinates based on the scale coordinates to obtain the original virtual eye coordinates of the current controlled object in the current virtual scene;

[0027] Determine the original coordinate system of the current eye position coordinates; wherein the original coordinate system includes a left-hand coordinate system or a right-hand coordinate system;

[0028] The original coordinate system of the original virtual eye coordinates is transformed to obtain the target virtual eye coordinates, and the target virtual eye coordinates are transformed into parallax coordinates to obtain the second scene position to which the virtual lens needs to switch.

[0029] In an exemplary embodiment of the present disclosure, performing a coordinate system transformation on the original coordinate system of the original virtual human eye coordinates to obtain the target virtual human eye coordinates includes:

[0030] Determine whether the original coordinate system belongs to a right-handed coordinate system;

[0031] When it is determined that the original coordinate system belongs to the right-hand coordinate system, the original coordinate system of the original virtual human eye coordinates is converted from the right-hand coordinate system to the left-hand coordinate system to obtain the target virtual human eye coordinates;

[0032] When it is determined that the original coordinate system belongs to the left-hand coordinate system, the original coordinate system of the original virtual human eye coordinates is converted from the left-hand coordinate system to the right-hand coordinate system to obtain the target virtual human eye coordinates.

[0033] In an exemplary embodiment of the present disclosure, determining a lens switching trajectory of a virtual lens according to a first scene position and a second scene position includes:

[0034] Obtaining a preset linear interpolation function, and calculating a slope of the linear interpolation function according to the first scene position and the second scene position;

[0035] Based on the linear interpolation function and the slope of the linear interpolation function, a lens switching trajectory of the virtual lens is determined.

[0036] In an exemplary embodiment of the present disclosure, based on the lens switching trajectory and the automatic telescopic component bound to the currently controlled object, the virtual lens is switched from the first scene position to the second scene position, including:

[0037] The virtual lens is controlled to move based on the lens switching trajectory by the automatic telescopic component until the virtual lens switches from the first scene switching position to the second scene switching position.

[0038] In an exemplary embodiment of the present disclosure, replacing the first scene picture based on a second scene picture including a target observed object shot by the virtual lens at a second scene position includes:

[0039] Acquire second posture information and second viewing angle information of the virtual lens at a second scene position; wherein the second posture information includes second offset posture information and / or second focal length information, and the second viewing angle information includes second field of view angle information and / or second pitch angle information;

[0040] In a second posture corresponding to the second offset posture information and / or the second focal length information, a second scene picture including the target observed object that can be photographed by the currently controlled object at a second viewing angle corresponding to the second field of view angle information and / or the second pitch angle information is collected;

[0041] The first scene picture is replaced by the second scene picture.

[0042] In an exemplary embodiment of the present disclosure, collecting a second scene picture including a target observed object that can be photographed by the currently controlled object at a second viewing angle corresponding to the second field of view angle information and / or the second pitch angle information in a second posture corresponding to the second offset posture information and / or the second focal length information, includes:

[0043] Calculating a horizontal field of view angle threshold according to the first scene position and the second scene position, and acquiring current virtual camera parameters and current virtual sensor parameters of the virtual lens;

[0044] Calculating the second field of view angle information according to the current virtual camera parameters and the current virtual sensor parameters, and determining whether the second field of view angle information is within a threshold range of a horizontal field of view angle threshold;

[0045] If the second field of view angle information is within a threshold range of a horizontal field of view angle threshold, a second scene picture including a target observed object that can be photographed by the currently controlled object at a second viewing angle corresponding to the second field of view angle information and / or the second pitch angle information is collected in a second posture corresponding to the second offset posture information and / or the second focal length information;

[0046] If the second field of view angle information exceeds the threshold range of the horizontal field of view angle threshold, the second field of view angle information is adjusted based on a preset field of view angle critical value, and the second scene image including the target observed object that can be captured by the current controlled object at a second viewing angle corresponding to the adjusted second field of view angle information and / or second pitch angle information is captured in a second posture corresponding to the second offset posture information and / or the second focal length information.

[0047] In an exemplary embodiment of the present disclosure, calculating a horizontal field of view angle threshold according to the first scene position and the second scene position includes:

[0048] Calculating a cosine value between the first scene position and the second scene position, and calculating a current angle between the first scene position and the second scene position according to the cosine value;

[0049] A first difference between the current angle and a first preset angle threshold is calculated, and the horizontal field of view angle threshold is determined according to the first difference and a second preset angle threshold.

[0050] According to one aspect of the present disclosure, there is provided a display device for a virtual scene, comprising:

[0051] A first display module, used for displaying on a display interface a first scene image including a currently observed object, shot at a first scene position by a virtual lens bound to the currently controlled object;

[0052] A lens switching trajectory determining module, used to determine the second scene position to which the virtual lens needs to switch according to the current human eye position coordinates at the current moment, and to determine the lens switching trajectory of the virtual lens according to the first scene position and the second scene position;

[0053] A lens switching module, used for switching the virtual lens from a first scene position to a second scene position based on the lens switching trajectory and the automatic telescopic component bound to the current controlled object;

[0054] The second display module is used to replace the first scene picture based on a second scene picture including a target observed object shot by the virtual lens at a second scene position.

[0055] According to one aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the method for displaying a virtual scene described in any one of the above is implemented.

[0056] According to one aspect of the present disclosure, there is provided an electronic device, including:

[0057] Processor; and

[0058] A memory, configured to store executable instructions of the processor;

[0059] Wherein, the processor is configured to execute any one of the above-mentioned methods for displaying a virtual scene by executing the executable instructions.

[0060] A method for displaying a virtual scene provided by an embodiment of the present disclosure, on the one hand, displays on a display interface a first scene picture including a current observed object shot at a first scene position by a virtual lens bound to a current controlled object; then determines a second scene position to which the virtual lens needs to be switched according to the current human eye position coordinates at the current moment, and determines a lens switching trajectory of the virtual lens according to the first scene position and the second scene position; then switches the virtual lens from the first scene position to the second scene position based on the lens switching trajectory and an automatic telescopic component bound to the current controlled object; finally, replaces the first scene picture based on a second scene picture including a target observed object shot by the virtual lens at the second scene position. Since the virtual lens can be switched based on the human eye position coordinates to achieve scene switching, the problem that the scene switching efficiency is reduced due to the inability to switch the scene according to the change of the human eye position in the prior art can be solved, thereby improving the scene switching efficiency; on the other hand, since the scene picture can be changed according to the change of the human eye position, the purpose of switching the scene picture according to the actual needs of the user is achieved, thereby improving the accuracy of the scene switching result and enhancing the user experience.

[0061] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0062] The accompanying drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the specification are used to explain the principles of the present disclosure. Obviously, the accompanying drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without creative work.

[0063] Figure 1 A flowchart schematically illustrates a method for displaying a virtual scene according to an exemplary embodiment of the present disclosure.

[0064] Figure 2 A scene example diagram schematically illustrates a process of creating a currently controlled object according to an example embodiment of the present disclosure.

[0065] Figure 3 An example diagram schematically illustrates a method for creating a currently controlled object according to an example embodiment of the present disclosure.

[0066] Figure 4 An example diagram schematically illustrates a lens switching trajectory of a virtual lens according to an example embodiment of the present disclosure.

[0067] Figure 5 An example diagram schematically illustrates another lens switching trajectory of a virtual lens according to an example embodiment of the present disclosure.

[0068] Figure 6 An example diagram of an interface for displaying the effects of a three-dimensional model according to an example embodiment of the present disclosure is schematically shown.

[0069] Figure 7 An example diagram of an interface of a model with light and shadow effects according to an example embodiment of the present disclosure is schematically shown.

[0070] Figure 8 An example diagram schematically shows an example of a plug-in and unplug-out interface of a model Actor according to an example embodiment of the present disclosure.

[0071] Fig. 9 A block diagram schematically shows a device for displaying a virtual scene according to an exemplary embodiment of the present disclosure.

[0072] Fig.10 An electronic device for implementing the above-mentioned method for displaying a virtual scene according to an exemplary embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION

[0073] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as being limited to the examples set forth herein; on the contrary, these embodiments are provided so that the present disclosure will be more comprehensive and complete, and the concepts of the example embodiments are fully conveyed to those skilled in the art. The described features, structures, or characteristics may be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced while omitting one or more of the specific details, or other methods, components, devices, steps, etc. may be adopted. In other cases, known technical solutions are not shown or described in detail to avoid obscuring various aspects of the present disclosure.

[0074] In addition, the accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor devices and / or microcontroller devices.

[0075] In some virtual scene display methods, some display devices with specific sizes and specific screen resolutions can be used for display; for example, the display device can be a 31.5-inch 8K naked-eye 3D display; wherein, the display is a first-released 8K ultra-high-resolution naked-eye 3D display; at the same time, in the actual application process, in order to match the display, it is also necessary to build a specific ecological product corresponding to the display, so it is very inconvenient in the process of use. For another example, the display device can also be an xx spatial display; however, although the spatial display has a specific display function, it has the following defects: on the one hand, the plug-in provided by the spatial display cannot include the global model, that is, it cannot adapt to all possible three-dimensional models; on the other hand, the plug-in provided by the spatial display needs to be cropped twice, because it will cause the effect of some models to not reach the best state; on the other hand, the capability provided by the spatial display is very redundant for the pre-installation conditions, and it is necessary to configure a lot of SDKs (Software Development Kits) and pre-environment, so it is also very inconvenient in the process of use.

[0076] Based on this, the exemplary embodiment of the present disclosure first provides a method for displaying a virtual scene, which can provide a global observation capability that can track the human eye in real time in a virtual ecosystem. At the same time, the method for displaying a virtual scene provided by the exemplary embodiment of the present disclosure can be run on a terminal device, server, server cluster or cloud server including Unreal Engine (UE); of course, those skilled in the art can also run the method of the present disclosure on other platforms as needed, and this is not specifically limited in the exemplary embodiment. Specifically, refer to Figure 1 As shown, the method for displaying the virtual scene may include the following steps:

[0077] Step S110. Displaying on the display interface a first scene image including the currently observed object, shot at the first scene position by a virtual lens bound to the currently controlled object;

[0078] Step S120. Determine the second scene position to which the virtual lens needs to switch according to the current eye position coordinates at the current moment, and determine the lens switching trajectory of the virtual lens according to the first scene position and the second scene position;

[0079] Step S130: based on the lens switching trajectory and the automatic telescopic component bound to the currently controlled object, the virtual lens is switched from the first scene position to the second scene position;

[0080] Step S140: Replace the first scene picture based on a second scene picture including a target observed object shot by the virtual lens at a second scene position.

[0081] In the above-mentioned virtual scene display method, on the one hand, a first scene picture including the current observed object shot at the first scene position by the virtual lens bound to the current controlled object is displayed on the display interface; then the second scene position to which the virtual lens needs to be switched is determined according to the current human eye position coordinates at the current moment, and the lens switching trajectory of the virtual lens is determined according to the first scene position and the second scene position; then based on the lens switching trajectory and the automatic telescopic component bound to the current controlled object, the virtual lens is switched from the first scene position to the second scene position; finally, based on the second scene picture including the target observed object shot by the virtual lens at the second scene position, the first scene picture is replaced. Since the virtual lens can be switched based on the human eye position coordinates to achieve the scene switching, the problem of the inability to change the scene according to the change of the human eye position in the prior art, thereby reducing the switching efficiency of the scene picture, can be solved, and the switching efficiency of the scene picture can be improved; on the other hand, since the scene picture can be changed according to the change of the human eye position, the purpose of achieving the scene picture switching according to the actual needs of the user is achieved, thereby improving the accuracy of the scene switching result and enhancing the user experience.

[0082] Hereinafter, the method for displaying a virtual scene according to an exemplary embodiment of the present disclosure will be explained and illustrated in detail with reference to the accompanying drawings.

[0083] First, the terms involved in the exemplary embodiments of the present disclosure are explained and illustrated.

[0084] Human eye recognition accuracy refers to collecting real-time human eye images through high-hertz equipment, and then processing the collected real-time human eye images through a human eye recognition algorithm to obtain the human eye coordinate position on the display interface; in the example embodiment of the present disclosure, the human eye position accuracy provided by hardware and algorithms is approximately 0.001mm, and the frequency is approximately 60HZ.

[0085] The isometric observer mode can be applied to the third-person perspective. It is a display state for observing the target in the third-person perspective. For example, with the screen as the dividing line between the real scene and the virtual scene, the isometric observer mode can be understood as the distance between the model on the screen and the screen, which is relatively constant with the distance between the person in the real world and the screen.

[0086] Data representation of human movement: Due to the physiological characteristics of irregular biological movement, when a person moves from point A to point B, it is impossible to maintain linear motion at the same height. Therefore, the position of the human eye is identified as continuous quasi-linear discrete points, which leads to unstable image shaking when using these data. At the same time, because the control of the Pawn simulated human movement requires setting its relative position and rotation, irregular data assignment will lead to irregular movement.

[0087] The third-person perspective, also known as the omniscient perspective, refers to observing from the perspective of a third person, which can bring more information. In actual application, assuming that the first-person perspective can only provide a 180-degree field of view, the third-person perspective provides a portion of the field of view on the basis of providing a 180-degree field of view.

[0088] Third-party observation: God's perspective is another name for the third-person perspective (third-person narration) in the narrative perspective; in actual application, the third-person narrator is like an omniscient God, who can describe anything without restriction in a non-realistic way; for example, the narrative can be unfolded at different time points in the same place, or the voices of multiple characters can appear alternately; at the same time, this narrative method is also called God's perspective because there is no perspective restriction; in this example embodiment, the third-person observation model can be used to refer to an observation mode in which the target model body does not change with the observation angle.

[0089] Window: In the display scene of the virtual scene, the display interface can be used to refer to a flat window, indicating that as the user's perspective changes, the model body under different FOV (Field of View) can be observed, and the 360° state of the model body itself can be seen, but the change in FOV will not cause visual distortion of the model body, thereby affecting the relative position of the model body and the observer.

[0090] Naked-eye 3D: Naked-eye 3D (English: Autostereoscopy) is a general term for technologies that achieve stereoscopic visual effects without the aid of external tools such as polarized glasses; among them, the representatives of this type of technology mainly include light barrier technology and cylindrical lens technology.

[0091] Pawn: Pawn is the currently controlled object recorded in the example embodiments of the present disclosure, which can be used to represent the base class of all Actors controlled by players or AI (Artificial Intelligence); at the same time, Pawn is the embodiment of the player or AI entity in the game scene; it can be seen that Pawn not only determines the appearance of the player or AI entity, but also determines how they collide with the scene and other physical interactions. Pawn also represents the physical position, rotation angle, etc. of the player or entity in the game.

[0092] Actor, the Actor involved in the example embodiments of the present disclosure, can be considered as a conceptual model that can be used to handle concurrent computing; at the same time, the Actor model defines a series of general rules for how system components should act and interact; an Actor refers to a most basic computing unit that can receive a message and perform calculations based on it. The Actor model is a lock-free design model designed to solve high-concurrency scenarios (high concurrency usually refers to ensuring that a system can process a large number of requests in parallel through design); in actual applications, most Actors are working modules that consume more computing power, memory or bandwidth resources, and are introduced here mainly to solve the problem of too many virtual scenes or virtual objects.

[0093] Character: A Character is a special type of Pawn that can walk. By default, there is a one-to-one relationship between controllers and Pawns; that is, each controller can only control one Pawn at a time; in addition, Pawns spawned during gameplay are not automatically controlled by controllers; for further information, see Figure 2 As shown in the figure, in Blueprints, the best way to add movement to Pawn and its subclasses is to call the SetActorLocation function. At the same time, when using SetActorLocation, the user can decide whether to teleport or walk to a certain location gradually. Furthermore, if it walks to a certain location gradually, the Pawn will move in a certain direction and will stop if it hits something.

[0094] FOV: Field of view, also known as field of view in optical engineering, determines the field of view of the optical instrument. The field of view can also be expressed as FOV, and its relationship with the focal length is as follows: image height = EFL*tan(half FOV); where EFL is the focal length and FOV is the field of view.

[0095] Unreal Engine: refers to the core components of some editable computer game systems or some interactive real-time graphics applications that have been written. In the actual application process, these systems can provide game designers with various tools needed to write games, with the aim of allowing game designers to easily and quickly make game programs without starting from scratch. At the same time, most Unreal Engines can support multiple operating system platforms, such as Linux, MacOSX, Windows, etc.; and most game engines can include the following systems: rendering engine (also known as renderer Shader, which can include two-dimensional graphics engine and three-dimensional graphics engine), physics engine, collision detection system, sound effect, script engine, computer animation, artificial intelligence, network engine and scene management, etc.

[0096] Secondly, the technical disclosure principle of the exemplary embodiment of the present disclosure is explained and illustrated. Specifically, the display method of the virtual scene recorded in the exemplary embodiment of the present disclosure can realize a technical solution of a follow-up third-party observation mode in the Unreal Engine based on the Pawn mode, and the goal is to keep the model normalized while keeping the camera moving to achieve 360° global observation of the model body and conversion adjustment of the equal scale; at the same time, in the display process of the specific virtual scene, a constant isometric observation mode can also be achieved, that is, the size of the observed model in the 31.5 naked-eye 3D display will not be affected by the distance of the user from the screen; further, it can also optimize the violent picture jitter caused by the high non-smoothness caused by the left and right movement of the human eye, and avoid the clipping of complex models and models with high number of faces, and provide a model observation capability of about -135° to +135° in three-dimensional space; at the same time, the model observation capability can also meet the requirements of wide-area observation in scenes exceeding the standard ±90° range of the screen.

[0097] The following will be combined Figure 3 Explain and illustrate the specific creation process of the current controlled object and the observed object. For details, refer to Figure 3 As shown, the following steps may be included:

[0098] Step S310, embedding an integrated virtual grid in the game engine, obtaining a current controlled object, and binding an observed object to the current controlled object; wherein the observed object includes the current observed object and / or the target observed object;

[0099] Step S320, configuring a virtual lens and an automatic telescopic component for the current controlled object; wherein the first position level where the automatic telescopic component is located is higher than the second position level where the virtual lens is located;

[0100] Step S330 , binding a virtual lens at the origin position of the currently controlled object, so as to shoot a scene image including the observed object through the virtual lens.

[0101] The following will explain and illustrate steps S310 to S330. Figure 2 As shown, first, a blueprint (NewBlueprint) corresponding to the current controlled object is created in the Unreal Engine, and at the same time, a default scene component DefaultSceneRoot is created under the blueprint, and then an automatic telescopic component and a virtual lens (Camera) are created under the default scene component, and the virtual lens is a child of the spring arm component; that is, the first position level where the automatic telescopic component is located is higher than the second position level where the virtual lens is located; wherein the automatic telescopic component can also be called a spring arm component (SpringArm); at the same time, the automatic telescopic component can be used to control the distance between the virtual lens and the current controlled object to avoid the problem of the virtual lens penetrating the virtual character; further, it is necessary to create the shape of the current controlled object Pawn under the default scene component; wherein the shape of Pawn can be achieved by embedding an integrated virtual mesh, and the virtual mesh can include a static mesh Static Mesh or a skeletal mesh Skeleton Mesh, this example does not impose special restrictions on this; further, it is also necessary to bind the observed object to the current controlled object. The observed object can also be called the model body of the target observation, which is a model body variable that changes with the virtual lens; when the virtual lens switches, the observed object can change with the change of the lens.

[0102] It should be noted that the currently controlled object recorded here can be a controlled model body, and the currently controlled object is a virtual object controlled by the current user; the movement trajectory of the currently controlled object in the virtual scene is determined by the eye position coordinates of the current user's eyes on the display interface at different times; the virtual lens includes a third-person lens, and the third-person lens is bound to the origin position of the currently controlled object, and the origin position is used as the third lens anchor point. That is, the currently controlled object recorded in the exemplary embodiment of the present disclosure.

[0103] It is necessary to further explain here that the current controlled object Pawn also includes two other variables: one variable is the three-dimensional vector VectorOld, which can be used to store the eye position coordinates received last time (that is, the historical eye coordinates); the other variable is VectorNew, which can be used to store the eye position coordinates received this time (that is, the current eye coordinates); at the same time, if there are no historical eye coordinates, the three-dimensional vector VectorOld can be set to the default value, where the specific value of the default value is: x=100000, y=100000, z=100000; that is, if there are no historical eye coordinates, the coordinates of the three-dimensional vector VectorOld are (10000, 10000, 10000). Of course, in the actual application process, the corresponding default values ​​can also be set according to actual needs, and this example does not impose special restrictions on this.

[0104] Below, we will collect Figure 2 as well as Figure 3 right Figure 1 The display method of the virtual scene shown in the figure is further explained and illustrated. Specifically:

[0105] In step S110, a first scene picture including the currently observed object, shot at a first scene position by a virtual lens bound to the currently controlled object, is displayed on a display interface.

[0106] Specifically, displaying on a display interface a first scene picture including a currently observed object captured at a first scene position by a virtual lens bound to a currently controlled object can be achieved in the following manner: first, obtaining first posture information and first viewing angle information of the virtual lens bound to the currently controlled object at the first scene position; wherein, the first posture information includes first offset posture information and / or first focal length information, and the first viewing angle information includes first field of view angle information and / or first pitch angle information; secondly, collecting a first scene picture including the currently observed object that can be captured by the currently controlled object at a first viewing angle corresponding to the first field of view angle information and / or the first pitch angle information in a first posture corresponding to the first offset posture information and / or the first focal length information, and displaying the first scene picture on the display interface; wherein, the first scene position includes a first default scene position and / or a scene position where the historical eye position coordinates of the current user at a previous moment corresponding to the current moment are located. That is, in actual application, the corresponding game screen can be captured with the angle value corresponding to the first offset attitude angle and the focal length value corresponding to the first focal length, through the first field of view angle and the first pitch angle, to obtain the first scene screen, and display the first scene screen on the display interface; of course, if the first scene position is the initialized first default scene position, the first scene screen is the default scene screen corresponding to the first default scene position; otherwise, it is the scene screen corresponding to the historical human eye position at the previous moment.

[0107] In step S120, the second scene position to which the virtual lens needs to be switched is determined according to the current eye position coordinates at the current moment, and the lens switching trajectory of the virtual lens is determined according to the first scene position and the second scene position.

[0108] In an example embodiment, first, the second scene position to which the virtual lens needs to switch is determined according to the current eye position coordinates at the current moment. The specific determination process of the second scene position can be implemented as follows: first, the current eye image of the current user at the current moment is collected by the camera module, and the first gaze position and the first gaze azimuth of the current user's eyes in the display interface at the current moment are determined according to the current eye image; secondly, based on the first gaze position and the first gaze azimuth, the current eye position coordinates of the current user's eyes on the display interface at the current moment are determined; then, the second scene position to which the virtual lens needs to switch is determined according to the current eye position coordinates. It should be supplemented here that the current eye position coordinates recorded here refer to the position coordinates of the gaze point of the human eye on the display interface; for example, assuming that the current eye position coordinates are (x1, y1, z1), then (x1, y1, z1) can be used to characterize the gaze point position of the current user's eyeball at the current moment on the display interface (or can also be understood as the display screen of the display).

[0109] In an exemplary embodiment, determining the second scene position to which the virtual lens needs to switch based on the current eye position coordinates can be achieved in the following manner: first, obtaining the scale coordinates between the current virtual scene and the real scene, and performing a scale geometric transformation on the current eye position coordinates based on the scale coordinates to obtain the original virtual eye coordinates of the current controlled object in the current virtual scene; secondly, determining the original coordinate system of the current eye position coordinates; wherein the original coordinate system includes a left-hand coordinate system or a right-hand coordinate system; and then, performing a coordinate system transformation on the original coordinate system of the original virtual eye coordinates to obtain the target virtual eye coordinates, and performing a parallax coordinate transformation on the target virtual eye coordinates to obtain the second scene position to which the virtual lens needs to switch.

[0110] In an exemplary embodiment, the coordinate system transformation of the original coordinate system of the original virtual human eye coordinates to obtain the target virtual human eye coordinates can be achieved in the following manner: first, determine whether the original coordinate system belongs to the right-handed coordinate system; second, when it is determined that the original coordinate system belongs to the right-handed coordinate system, transform the original coordinate system of the original virtual human eye coordinates from the right-handed coordinate system to the left-handed coordinate system to obtain the target virtual human eye coordinates; at the same time, when it is determined that the original coordinate system belongs to the left-handed coordinate system, transform the original coordinate system of the original virtual human eye coordinates from the left-handed coordinate system to the right-handed coordinate system to obtain the target virtual human eye coordinates.

[0111] The specific process of determining the second scene position will be further explained and illustrated below. Specifically, first, the current image of the human eye can be captured by a camera module; wherein, the camera module recorded here can be a camera module carried by the terminal device itself, or an external camera device, and this example does not impose any special restrictions on this; at the same time, after the current image of the human eye is captured, the first gaze position and the first gaze azimuth of the human eye in the display interface can be determined by an image recognition model or an image recognition algorithm; wherein, the image recognition model recorded here can include but is not limited to a convolutional neural network model, a recurrent neural network model, a deep neural network model, etc., and this example does not impose any special restrictions on this; further, based on the first The gaze position and the first gaze azimuth determine the current eye position coordinates of the human eye; at the same time, after obtaining the eye position coordinates, it is also necessary to perform a proportional transformation of the eye position coordinates based on the scale coordinates between the current virtual scene and the real scene; wherein the proportional transformation recorded here may include but is not limited to equal-proportional enlargement, equal-proportional reduction, or partial enlargement and partial reduction, etc., which can be determined according to actual needs in actual application, and this example does not impose special restrictions on this; at the same time, the scale coordinates between the current virtual scene and the real scene recorded here can be set in advance by the developer according to actual conditions.

[0112] Further, after obtaining the original virtual human eye coordinates, a coordinate system conversion is required; wherein, the coordinate system conversion recorded here may include left-hand coordinate system conversion and / or parallax coordinate system conversion; wherein, the principle of left-hand coordinate system conversion is: since there is a problem of left-right inconsistency in the coordinates inside and outside the screen; therefore, in the actual application process, in order to maintain the consistency between virtual and reality, the left-hand coordinate system conversion is first required; that is, if the reality is a right-hand coordinate system, it needs to be converted to a left-hand coordinate system; if the reality is a left-hand coordinate system, it needs to be converted to a right-hand coordinate system; in actual situations, it can be determined according to actual needs, and this example does not impose special restrictions on this; further, in the process of parallax coordinate system conversion, it can be achieved in the following way: first, the target virtual human eye coordinates are mapped to the roll axis, pitch axis and yaw axis, and then the change value of the target virtual human eye coordinates in the Yaw axis, the change value in the Pitch axis and the change value in the Roll axis are obtained, and finally the second scene position is obtained according to the change value of the Yaw axis, the change value in the Pitch axis and the change value in the Roll axis.

[0113] Secondly, after obtaining the second scene position, the lens switching trajectory of the virtual lens can be determined according to the first scene position and the second scene position. Specifically, the specific determination process of the lens switching trajectory can be implemented in the following manner: first, obtain a preset linear interpolation function, and calculate the slope of the linear interpolation function according to the first scene position and the second scene position; secondly, determine the lens switching trajectory of the virtual lens based on the linear interpolation function and the slope of the linear interpolation function. That is, in the actual application process, a linear method can be used for interpolation; that is, the given data points are connected in sequence with line segments, and the speed of movement between points is a constant value. Based on this principle, the lens switching trajectory can be determined by a linear interpolation function. Among them, the linear interpolation function recorded here can be specifically referred to as shown in the following formula (1):

[0114] q(t)=a0+a1(t1-t0); Formula (1)

[0115] Among them, q(t) represents a linear interpolation function, which can be used to represent the curve after interpolation, a0 and a1 are constant parameters to be determined; at the same time, t0 represents the initial time (previous time), a0 represents the position at the initial time (first scene position), and a1 represents the slope, that is, the speed, which is a constant here; therefore, given the position q(t1) at the next time t1, the result shown in the following formula (2) can be obtained:

[0116]

[0117] Furthermore, based on formula (2), we can get the result of formula (3):

[0118]

[0119] Furthermore, after the slope is obtained, the lens switching trajectory of the virtual lens can be obtained; wherein the lens switching trajectory of the virtual lens obtained can be specifically referred to Figure 4 as well as Figure 5 shown.

[0120] It should be noted that in the actual application process, first, it is necessary to determine whether the current Old value (first scene position) is the initial reference point value. If so, the received value (second scene position) is assigned to OLD. If not, the difference between the XY of the two vectors is calculated; that is, if the first scene position is the default scene position, the second scene position can be directly assigned to a0; if not, q(t1)-q(t0) can be calculated. At the same time, in the actual application process, the corresponding parameters can be brought into the spring arm in the UE engine to complete the corresponding smoothness curve setting; and the advantage of this is that it can ensure that there is no camera shaking under a certain stability; in addition, the purpose of making the interpolation curve here is to simulate the acceleration and deceleration process of normal human movement, which can ensure a better user experience.

[0121] In step S130, based on the lens switching trajectory and the automatic telescopic component bound to the current controlled object, the virtual lens is switched from the first scene position to the second scene position.

[0122] Specifically, based on the lens switching trajectory and the automatic telescopic component bound to the current controlled object, switching the virtual lens from the first scene position to the second scene position can be achieved in the following manner: the automatic telescopic component is used to control the virtual lens to move based on the lens switching trajectory until the virtual lens switches from the first scene switching position to the second scene switching position. The purpose of setting up an automatic telescopic component here is to control the distance between the current controlled object and the virtual lens through the automatic telescopic component, thereby avoiding the problem of the virtual lens penetrating the virtual object due to the small distance between the virtual lens and the virtual object; the virtual object recorded here may include the observed object or other objects, and this example does not impose any special restrictions on this.

[0123] In step S140, the first scene picture is replaced based on a second scene picture including a target observed object shot by the virtual lens at a second scene position.

[0124] Specifically, replacing the first scene picture based on the second scene picture including the target observed object captured by the virtual lens at the second scene position can be achieved in the following manner: first, obtaining second posture information and second viewing angle information of the virtual lens at the second scene position; wherein the second posture information includes second offset posture information and / or second focal length information, and the second viewing angle information includes second field of view angle information and / or second pitch angle information; secondly, collecting the second scene picture including the target observed object that can be captured by the currently controlled object at the second viewing angle corresponding to the second field of view angle information and / or the second pitch angle information with a second posture corresponding to the second offset posture information and / or the second focal length information; and then, replacing the first scene picture with the second scene picture.

[0125] In an exemplary embodiment, a second scene picture including a target observed object that can be photographed by the currently controlled object at a second viewing angle corresponding to the second field of view angle information and / or the second pitch angle information is collected in a second posture corresponding to the second offset posture information and / or the second focal length information, including: first, calculating a horizontal field of view angle threshold according to the first scene position and the second scene position, and obtaining current virtual camera parameters and current virtual sensor parameters of the virtual lens; secondly, calculating the second field of view angle information according to the current virtual camera parameters and the current virtual sensor parameters, and determining whether the second field of view angle information is within a threshold range of the horizontal field of view angle threshold; further, if the second field of view angle information is within the horizontal field of view angle threshold, If the value is within the threshold range, the second scene picture including the target observed object that can be photographed by the current controlled object at the second viewing angle corresponding to the second field of view angle information and / or the second pitch angle information is collected in a second posture corresponding to the second offset posture information and / or the second focal length information; further, if the second field of view angle information exceeds the threshold range of the horizontal field of view angle threshold, the second field of view angle information is adjusted based on a preset field of view angle critical value, and the second scene picture including the target observed object that can be photographed by the current controlled object at the second viewing angle corresponding to the adjusted second field of view angle information and / or the second pitch angle information is collected in a second posture corresponding to the second offset posture information and / or the second focal length information.

[0126] In an example embodiment, calculating the horizontal field of view angle threshold based on the first scene position and the second scene position can be achieved as follows: first, calculating the cosine value between the first scene position and the second scene position, and calculating the current angle between the first scene position and the second scene position based on the cosine value; second, calculating a first difference between the current angle and a first preset angle threshold, and determining the horizontal field of view angle threshold based on the first difference and the second preset angle threshold.

[0127] Below, the specific switching process of the scene screen will be explained and illustrated. First, determine the horizontal field of view angle threshold; specifically, the example embodiment of the present disclosure takes the solution of realizing a horizontal observation angle of ±135° as an example for explanation. In the actual application process, since the movement of the human eye is a continuous process, it is necessary to record two parts of cache data: the first part is: the initial recognition of the position of the human eye; the second part is: the angle deviation of the latest recognition of the human eye position relative to the initial position. When the difference between the Arccos value of the angle between the two coordinates and 60 reaches a critical value less than 14, the Fov should be set to 90+Arccos-60. This value changes dynamically. When the value does not reach this critical value or is less than this critical value, it is set to 60 by default; at the same time, with the central axis of the screen as the dividing line, both the left and right sides can be set using this method. That is, first, calculate the cosine value between the first scene position and the second scene position, then calculate the arccosine value Arccos of the cosine value to obtain the current angle; then calculate Arccos-60 (the first preset angle threshold) to obtain the first difference; then determine whether the first difference is less than 14 (the second preset angle threshold); if so, the calculation method of the horizontal field of view angle threshold is: 90+Arccos-60; if not, the horizontal field of view angle threshold is 60°.

[0128] Furthermore, it is necessary to calculate the second field of view angle information; wherein, the specific calculation method of the second field of view angle information can refer to the following formula (4):

[0129] FOV=arctan(0.5 width(sensor width) / focal(mm))(±14°) Formula (4)

[0130] Among them, FOV is the second field of view angle information, sensor width is the current virtual sensor parameter, and focal is the current virtual camera parameter (that is, the focal length parameter). It should be noted here that the reason why 14° is used as a redundant value is that according to the theory that light propagates in a straight line, the angle between the earth's surface and the fully risen sun is about 28 degrees and 34 minutes, which is rounded to 28 here, and half of it is 14.

[0131] So far, the display method of the virtual scene recorded in the exemplary embodiment of the present disclosure has been fully realized. Below, the display method of the virtual scene recorded in the exemplary embodiment of the present disclosure will be further explained and illustrated in combination with a specific scene. Specifically:

[0132] First, adapt the effect display of all possible 3D models in Unreal Engine, and keep all the light and shadow effects of the model, including some special light and shadow effects; among them, the effect display of 3D models can refer to Figure 6 As shown, the display of special light and shadow effects can be referred to Figure 7 As shown; then, simplify the pre-installation conditions, plug and unplug and use; a single Pawn can be migrated at any time; that is, in the actual application process, multiple different virtual objects in multiple different scenes can be set in the form of Actors; when the scene display is required, the corresponding Actors can be added or deleted by plugging and unplugging to achieve the purpose of adapting to a variety of different scenes; among them, the specific configuration scene diagram of each model can be referred to Figure 8 As shown; under this premise, if scene display is required, the virtual scene display method recorded above can be directly executed.

[0133] The following are embodiments of the device disclosed herein, which can be used to execute the method embodiments disclosed herein. For details not disclosed in the device embodiments disclosed herein, please refer to the method embodiments disclosed herein.

[0134] The exemplary embodiment of the present disclosure also provides a display device for a virtual scene. Specifically, refer to Fig. 9 As shown, the display device of the virtual scene may include a first display module 910, a lens switching trajectory determination module 920, a lens switching module 930 and a second display module 940. Among them:

[0135] The first display module 910 may be used to display on a display interface a first scene image including a currently observed object, shot at a first scene position by a virtual lens bound to the currently controlled object;

[0136] The lens switching trajectory determining module 920 may be used to determine the second scene position to which the virtual lens needs to switch according to the current eye position coordinates at the current moment, and determine the lens switching trajectory of the virtual lens according to the first scene position and the second scene position;

[0137] The lens switching module 930 may be used to switch the virtual lens from the first scene position to the second scene position based on the lens switching trajectory and the automatic retractable component bound to the currently controlled object;

[0138] The second display module 940 may be used to replace the first scene picture based on a second scene picture including a target observed object shot by the virtual lens at a second scene position.

[0139] In an exemplary embodiment of the present disclosure, the currently controlled object is a controlled model body, and the currently controlled object is a virtual object controlled by the current user; the movement trajectory of the currently controlled object in the virtual scene is determined by the eye position coordinates of the current user's eyes on the display interface at different moments; the virtual lens includes a third-person lens, and the third-person lens is bound to the origin position of the currently controlled object, and the origin position is used as the third lens anchor point.

[0140] In an exemplary embodiment of the present disclosure, the display device of the virtual scene further includes:

[0141] The current controlled object creation module can be used to embed an integrated virtual grid in the game engine, obtain the current controlled object, and bind the observed object to the current controlled object; wherein the observed object includes the current observed object and / or the target observed object;

[0142] The automatic telescopic component configuration module can be used to configure a virtual lens and an automatic telescopic component for the current controlled object; wherein the first position level where the automatic telescopic component is located is higher than the second position level where the virtual lens is located;

[0143] The virtual lens binding module can be used to bind a virtual lens at the origin position of the currently controlled object, so as to shoot a scene image including the observed object through the virtual lens.

[0144] In an exemplary embodiment of the present disclosure, a first scene picture including a currently observed object captured at a first scene position by a virtual lens bound to a currently controlled object is displayed on a display interface, including: obtaining first posture information and first viewing angle information of the virtual lens bound to the currently controlled object at the first scene position; wherein the first posture information includes first offset posture information and / or first focal length information, and the first viewing angle information includes first field of view angle information and / or first pitch angle information; with a first posture corresponding to the first offset posture information and / or the first focal length information, collecting the first scene picture including the currently observed object that can be captured by the currently controlled object at a first viewing angle corresponding to the first field of view angle information and / or the first pitch angle information, and displaying the first scene picture on the display interface; wherein the first scene position includes a first default scene position and / or a scene position where the historical eye position coordinates of the current user at a previous moment corresponding to the current moment are located.

[0145] In an exemplary embodiment of the present disclosure, the second scene position to which the virtual lens needs to switch is determined based on the current eye position coordinates at the current moment, including: capturing the current eye image of the current user at the current moment through a camera module, and determining the first gaze position and the first gaze azimuth of the current user's eyes in the display interface at the current moment based on the current eye image; determining the current eye position coordinates of the current user's eyes on the display interface at the current moment based on the first gaze position and the first gaze azimuth; and determining the second scene position to which the virtual lens needs to switch based on the current eye position coordinates.

[0146] In an exemplary embodiment of the present disclosure, determining the second scene position to which the virtual lens needs to switch according to the current human eye position coordinates includes: obtaining the scale coordinates between the current virtual scene and the real scene, and performing a scale geometric transformation on the current human eye position coordinates based on the scale coordinates to obtain the original virtual human eye coordinates of the current controlled object in the current virtual scene; determining the original coordinate system of the current human eye position coordinates; wherein the original coordinate system includes a left-hand coordinate system or a right-hand coordinate system; performing a coordinate system transformation on the original coordinate system of the original virtual human eye coordinates to obtain target virtual human eye coordinates, and performing a parallax coordinate transformation on the target virtual human eye coordinates to obtain the second scene position to which the virtual lens needs to switch.

[0147] In an exemplary embodiment of the present disclosure, a coordinate system transformation is performed on the original coordinate system of the original virtual human eye coordinates to obtain the target virtual human eye coordinates, including: judging whether the original coordinate system belongs to the right-handed coordinate system; when it is determined that the original coordinate system belongs to the right-handed coordinate system, transforming the original coordinate system of the original virtual human eye coordinates from the right-handed coordinate system to the left-handed coordinate system to obtain the target virtual human eye coordinates; when it is determined that the original coordinate system belongs to the left-handed coordinate system, transforming the original coordinate system of the original virtual human eye coordinates from the left-handed coordinate system to the right-handed coordinate system to obtain the target virtual human eye coordinates.

[0148] In an exemplary embodiment of the present disclosure, determining a lens switching trajectory of a virtual lens according to a first scene position and a second scene position includes: obtaining a preset linear interpolation function, and calculating a slope of the linear interpolation function according to the first scene position and the second scene position; and determining the lens switching trajectory of the virtual lens based on the linear interpolation function and the slope of the linear interpolation function.

[0149] In an exemplary embodiment of the present disclosure, based on the lens switching trajectory and the automatic telescopic component bound to the current controlled object, the virtual lens is switched from the first scene position to the second scene position, including: controlling the virtual lens to move based on the lens switching trajectory through the automatic telescopic component until the virtual lens switches from the first scene switching position to the second scene switching position.

[0150] In an exemplary embodiment of the present disclosure, based on a second scene picture including a target observed object photographed by the virtual lens at a second scene position, the first scene picture is replaced, including: obtaining second posture information and second viewing angle information of the virtual lens at the second scene position; wherein the second posture information includes second offset posture information and / or second focal length information, and the second viewing angle information includes second field of view angle information and / or second pitch angle information; collecting a second scene picture including the target observed object that can be photographed by the currently controlled object at a second viewing angle corresponding to the second field of view angle information and / or the second pitch angle information with a second posture corresponding to the second offset posture information and / or the second focal length information; and replacing the first scene picture with the second scene picture.

[0151] In an exemplary embodiment of the present disclosure, a second scene picture including a target observed object that can be photographed by the currently controlled object at a second viewing angle corresponding to the second field of view angle information and / or the second pitch angle information is collected in a second posture corresponding to the second offset posture information and / or the second focal length information, including: calculating a horizontal field of view angle threshold according to the first scene position and the second scene position, and obtaining current virtual camera parameters and current virtual sensor parameters of the virtual lens; calculating the second field of view angle information according to the current virtual camera parameters and the current virtual sensor parameters, and determining whether the second field of view angle information is within a threshold range of the horizontal field of view angle threshold; if the second field of view angle information is within the horizontal field of view angle threshold, If the value is within the threshold range of the horizontal field of view angle threshold, the second scene picture including the target observed object that can be photographed by the current controlled object at the second viewing angle corresponding to the second field of view angle information and / or the second pitch angle information is collected in a second posture corresponding to the second offset posture information and / or the second focal length information; if the second field of view angle information exceeds the threshold range of the horizontal field of view angle threshold, the second field of view angle information is adjusted based on a preset field of view angle critical value, and the second scene picture including the target observed object that can be photographed by the current controlled object at the second viewing angle corresponding to the adjusted second field of view angle information and / or the second pitch angle information is collected in a second posture corresponding to the second offset posture information and / or the second focal length information.

[0152] In an exemplary embodiment of the present disclosure, a horizontal field of view angle threshold is calculated based on the first scene position and the second scene position, including: calculating a cosine value between the first scene position and the second scene position, and calculating a current angle between the first scene position and the second scene position based on the cosine value; calculating a first difference between the current angle and a first preset angle threshold, and determining the horizontal field of view angle threshold based on the first difference and the second preset angle threshold.

[0153] The specific details of each module in the above-mentioned virtual scene display device have been described in detail in the corresponding virtual scene display method, so they will not be repeated here.

[0154] It should be noted that, although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into multiple modules or units to be embodied.

[0155] In addition, although the steps of the method in the present disclosure are described in a specific order in the drawings, this does not require or imply that the steps must be performed in this specific order, or that all the steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps, etc.

[0156] In an exemplary embodiment of the present disclosure, an electronic device capable of implementing the above method is also provided.

[0157] Those skilled in the art will appreciate that various aspects of the present disclosure may be implemented as systems, methods or program products. Therefore, various aspects of the present disclosure may be specifically implemented in the following forms, namely: complete hardware implementation, complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software, which may be collectively referred to herein as "circuits", "modules" or "systems".

[0158] Refer to the following Fig.10 The electronic device 1000 according to this embodiment of the present disclosure is described. Fig.10 The electronic device 1000 shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0159] like Fig.10As shown, the electronic device 1000 is in the form of a general computing device. The components of the electronic device 1000 may include, but are not limited to: the at least one processing unit 1010, the at least one storage unit 1020, a bus 1030 connecting different system components (including the storage unit 1020 and the processing unit 1010), and a display unit 1040.

[0160] The storage unit stores program codes, which can be executed by the processing unit 1010, so that the processing unit 1010 performs the steps according to various exemplary embodiments of the present disclosure described in the above “Exemplary Method” section of this specification. For example, the processing unit 1010 can perform the following steps: Figure 1 Step S110 shown in: displaying on the display interface a first scene picture including the current observed object shot at the first scene position by the virtual lens bound to the current controlled object; step S120: determining the second scene position to which the virtual lens needs to be switched according to the current human eye position coordinates at the current moment, and determining the lens switching trajectory of the virtual lens according to the first scene position and the second scene position; step S130: switching the virtual lens from the first scene position to the second scene position based on the lens switching trajectory and the automatic telescopic component bound to the current controlled object; step S140: replacing the first scene picture based on the second scene picture including the target observed object shot at the second scene position by the virtual lens.

[0161] The storage unit 1020 may include a readable medium in the form of a volatile storage unit, such as a random access storage unit (RAM) 10201 and / or a cache storage unit 10202 , and may further include a read-only storage unit (ROM) 10203 .

[0162] The storage unit 1020 may also include a program / utility 10204 having a set (at least one) of program modules 10205, such program modules 10205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.

[0163] Bus 1030 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.

[0164] The electronic device 1000 may also communicate with one or more external devices 1100 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 1000, and / or may communicate with any device that enables the electronic device 1000 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 1050. Furthermore, the electronic device 1000 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 1060. As shown, the network adapter 1060 communicates with other modules of the electronic device 1000 via a bus 1030. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 1000, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0165] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the implementation of the present disclosure.

[0166] In an exemplary embodiment of the present disclosure, a computer-readable storage medium is also provided, on which a program product capable of implementing the above method of the present specification is stored. In some possible implementations, various aspects of the present disclosure may also be implemented in the form of a program product, which includes a program code, and when the program product is run on a terminal device, the program code is used to enable the terminal device to execute the steps according to various exemplary implementations of the present disclosure described in the above "Exemplary Method" section of the present specification.

[0167] According to the program product for implementing the above method in the embodiment of the present disclosure, it can adopt a portable compact disk read-only memory (CD-ROM) and include program code, and can be run on a terminal device, such as a personal computer. However, the program product of the present disclosure is not limited thereto. In this document, a readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, an apparatus or a device.

[0168] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0169] Computer readable signal media may include data signals propagated in baseband or as part of a carrier wave, in which readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Readable signal media may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0170] The program code embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.

[0171] Program code for performing the operations of the present disclosure may be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java, C++, etc., and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).

[0172] In addition, the above-mentioned figures are only schematic illustrations of the processes included in the method according to the exemplary embodiments of the present disclosure, and are not intended to be limiting. It is easy to understand that the processes shown in the above-mentioned figures do not indicate or limit the time sequence of these processes. In addition, it is also easy to understand that these processes can be performed synchronously or asynchronously, for example, in multiple modules.

[0173] Other embodiments of the present disclosure will be readily apparent to those skilled in the art after considering the specification and practicing the inventions invented herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not invented by the present disclosure. The specification and examples are to be considered merely exemplary, and the true scope and spirit of the present disclosure are indicated by the claims.

Claims

1. A method for displaying a virtual scene, characterized in that: include: Displaying on the display interface a first scene image including the currently observed object, shot at the first scene position by a virtual lens bound to the currently controlled object; Determining the second scene position to which the virtual lens needs to switch according to the current human eye position coordinates at the current moment, and determining the lens switching trajectory of the virtual lens according to the first scene position and the second scene position; Based on the lens switching trajectory and the automatic telescopic component bound to the current controlled object, the virtual lens is switched from the first scene position to the second scene position; The first scene picture is replaced based on a second scene picture including a target observed object shot by the virtual lens at a second scene position.

2. The method for displaying a virtual scene according to claim 1, characterized in that: The currently controlled object is a controlled model body, and the currently controlled object is a virtual object controlled by a current user; The movement trajectory of the currently controlled object in the virtual scene is determined by the eye position coordinates of the current user's eyes on the display interface at different moments; The virtual lens includes a third-person lens, and the third-person lens is bound to the origin position of the current controlled object, and the origin position is used as the third lens anchor point.

3. The method for displaying a virtual scene according to claim 1 or 2, characterized in that: The method for displaying the virtual scene also includes: Embedding an integrated virtual grid in a game engine to obtain a current controlled object, and binding an observed object to the current controlled object; wherein the observed object includes the current observed object and / or the target observed object; A virtual lens and an automatic telescopic component are configured for the currently controlled object; wherein a first position level where the automatic telescopic component is located is higher than a second position level where the virtual lens is located; A virtual lens is bound at the origin position of the currently controlled object, so as to shoot a scene picture including the observed object through the virtual lens.

4. The method for displaying a virtual scene according to claim 1, characterized in that: Displaying a first scene image including the currently observed object shot at the first scene position by a virtual lens bound to the currently controlled object on the display interface includes: Acquire first posture information and first viewing angle information of the virtual lens bound to the currently controlled object at a first scene position; wherein the first posture information includes first offset posture information and / or first focal length information, and the first viewing angle information includes first field of view angle information and / or first pitch angle information; In a first posture corresponding to the first offset posture information and / or the first focal length information, a first scene picture including the currently observed object that can be photographed by the currently controlled object at a first viewing angle corresponding to the first field of view angle information and / or the first pitch angle information is collected, and the first scene picture is displayed on the display interface; The first scene position includes a first default scene position and / or a scene position where the historical eye position coordinates of the current user at a previous moment corresponding to the current moment are located.

5. The method for displaying a virtual scene according to claim 1, characterized in that: Determining the second scene position to which the virtual lens needs to switch according to the current human eye position coordinates at the current moment includes: Capturing a current eye image of the current user at the current moment through a camera module, and determining a first gaze position and a first gaze azimuth of the eyes of the current user in the display interface at the current moment according to the current eye image; Based on the first gaze position and the first gaze azimuth, determining current eye position coordinates of the current user's eyes on the display interface at a current moment; The second scene position to which the virtual lens needs to switch is determined according to the current human eye position coordinates.

6. The method for displaying a virtual scene according to claim 5, characterized in that: Determining the second scene position to which the virtual lens needs to switch according to the current human eye position coordinates includes: Acquire the scale coordinates between the current virtual scene and the real scene, and perform a scale geometric transformation on the current eye position coordinates based on the scale coordinates to obtain the original virtual eye coordinates of the current controlled object in the current virtual scene; Determine the original coordinate system of the current eye position coordinates; wherein the original coordinate system includes a left-hand coordinate system or a right-hand coordinate system; The original coordinate system of the original virtual eye coordinates is transformed to obtain the target virtual eye coordinates, and the target virtual eye coordinates are transformed into parallax coordinates to obtain the second scene position to which the virtual lens needs to switch.

7. The method for displaying a virtual scene according to claim 6, characterized in that: Performing coordinate transformation on the original coordinate system of the original virtual eye coordinates to obtain target virtual eye coordinates includes: Determine whether the original coordinate system belongs to a right-handed coordinate system; When it is determined that the original coordinate system belongs to the right-hand coordinate system, the original coordinate system of the original virtual human eye coordinates is converted from the right-hand coordinate system to the left-hand coordinate system to obtain the target virtual human eye coordinates; When it is determined that the original coordinate system belongs to the left-hand coordinate system, the original coordinate system of the original virtual human eye coordinates is converted from the left-hand coordinate system to the right-hand coordinate system to obtain the target virtual human eye coordinates.

8. The method for displaying a virtual scene according to claim 1, characterized in that: Determining a lens switching trajectory of a virtual lens according to a first scene position and a second scene position includes: Obtaining a preset linear interpolation function, and calculating a slope of the linear interpolation function according to the first scene position and the second scene position; Based on the linear interpolation function and the slope of the linear interpolation function, a lens switching trajectory of the virtual lens is determined.

9. The method for displaying a virtual scene according to claim 1, characterized in that: Based on the lens switching trajectory and the automatic telescopic component bound to the current controlled object, the virtual lens is switched from the first scene position to the second scene position, including: The virtual lens is controlled to move based on the lens switching trajectory by the automatic telescopic component until the virtual lens switches from the first scene switching position to the second scene switching position.

10. The method for displaying a virtual scene according to claim 1, characterized in that: The first scene picture is replaced based on a second scene picture including a target observed object shot by the virtual lens at a second scene position, comprising: Acquire second posture information and second viewing angle information of the virtual lens at a second scene position; wherein the second posture information includes second offset posture information and / or second focal length information, and the second viewing angle information includes second field of view angle information and / or second pitch angle information; In a second posture corresponding to the second offset posture information and / or the second focal length information, a second scene picture including the target observed object that can be photographed by the currently controlled object at a second viewing angle corresponding to the second field of view angle information and / or the second pitch angle information is collected; The first scene picture is replaced by the second scene picture.

11. The method for displaying a virtual scene according to claim 10, characterized in that: The second scene picture including the target observed object that can be photographed by the currently controlled object at a second viewing angle corresponding to the second field of view angle information and / or the second pitch angle information is collected in a second posture corresponding to the second offset posture information and / or the second focal length information, including: Calculating a horizontal field of view angle threshold according to the first scene position and the second scene position, and acquiring current virtual camera parameters and current virtual sensor parameters of the virtual lens; Calculating the second field of view angle information according to the current virtual camera parameters and the current virtual sensor parameters, and determining whether the second field of view angle information is within a threshold range of a horizontal field of view angle threshold; If the second field of view angle information is within a threshold range of a horizontal field of view angle threshold, a second scene picture including a target observed object that can be photographed by the currently controlled object at a second viewing angle corresponding to the second field of view angle information and / or the second pitch angle information is collected in a second posture corresponding to the second offset posture information and / or the second focal length information; If the second field of view angle information exceeds the threshold range of the horizontal field of view angle threshold, the second field of view angle information is adjusted based on a preset field of view angle critical value, and the second scene image including the target observed object that can be captured by the current controlled object at a second viewing angle corresponding to the adjusted second field of view angle information and / or second pitch angle information is captured in a second posture corresponding to the second offset posture information and / or the second focal length information.

12. The method for displaying a virtual scene according to claim 11, characterized in that: Calculating a horizontal field of view angle threshold according to the first scene position and the second scene position includes: Calculating a cosine value between the first scene position and the second scene position, and calculating a current angle between the first scene position and the second scene position according to the cosine value; A first difference between the current angle and a first preset angle threshold is calculated, and the horizontal field of view angle threshold is determined according to the first difference and a second preset angle threshold.

13. A virtual scene display device, characterized in that: include: A first display module, used for displaying on a display interface a first scene image including a currently observed object, shot at a first scene position by a virtual lens bound to the currently controlled object; A lens switching trajectory determining module, used to determine the second scene position to which the virtual lens needs to switch according to the current human eye position coordinates at the current moment, and to determine the lens switching trajectory of the virtual lens according to the first scene position and the second scene position; A lens switching module, used for switching the virtual lens from a first scene position to a second scene position based on the lens switching trajectory and the automatic telescopic component bound to the current controlled object; The second display module is used to replace the first scene picture based on a second scene picture including a target observed object shot by the virtual lens at a second scene position.

14. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for displaying a virtual scene according to any one of claims 1 to 12 is implemented.

15. An electronic device, characterized in that: include: processor; as well as A memory, configured to store executable instructions of the processor; Wherein, the processor is configured to execute the method for displaying a virtual scene according to any one of claims 1 to 12 by executing the executable instructions.

Citation Information

Cited By

  • Picture transformation method, virtual scene display system and device and electronic equipment

    CN119762717A