Virtual scene switching method, apparatus and device, and storage medium

By directly switching the camera perspective during virtual scene switching and loading the scene content in advance, the problem of unsmooth virtual scene switching in the existing technology is solved, and the effect of seamless switching and improving user experience is achieved.

WO2025130465A1PCT designated stage expired Publication Date: 2025-06-26MIGU CO LTD +1
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/132632
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-12-19
Filing Date
2024-11-18
Publication Date
2025-06-26

AI Technical Summary

Technical Problem

The prior art cannot provide a smooth experience when switching virtual scenes, and users can clearly perceive the sense of occlusion and lag, reducing the user experience.

Method used

By directly switching the camera perspectives of the first scene and the second scene during the switching of the scene, and loading the scene content of the second scene through the portal when the virtual character is close to the second scene, avoiding displaying the loading interface or animation effects before the user passes through the portal.

Benefits of technology

It improves the smoothness of virtual scene switching, achieves the effect of seamlessly switching virtual scenes, and improves user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024132632_26062025_PF_FP_ABST
    Figure CN2024132632_26062025_PF_FP_ABST
Patent Text Reader

Abstract

Disclosed in the present invention are a virtual scene switching method, apparatus and device, and a storage medium. A scene camera is configured for each of virtual scenes; for each scene, when a virtual character is in a first scene and it is detected that the virtual character enters a second scene from the first scene, the camera viewing angle of the virtual character is switched from the camera viewing angle of the first scene to the camera viewing angle of the second scene, so as to display scene content of the second scene; when the virtual character enters the second scene, all the scene content of the second scene can be seen.
Need to check novelty before this filing date? Find Prior Art

Description

Virtual scene switching method, device, equipment and storage medium

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This application claims priority to Chinese Patent Application No. 202311750459.9 filed in China on December 19, 2023, the entire contents of which are incorporated herein by reference. Technical Field

[0003] The present invention relates to the field of computer technology, and in particular to a virtual scene switching method, device, equipment and storage medium. Background Art

[0004] Virtual scenes are virtual worlds constructed using digital technology. They have strong interactive potential and are in high demand in gaming, social networking, and conferencing. For example, three-dimensional (3D) virtual scenes or metaverse scenes are highly demanding. As virtual scenes diversify, users need to frequently switch scenes during their virtual scene experiences to view virtual scene images from different camera lenses. For example, in gaming applications, different game images can be displayed when switching between different game scenes. The virtual scene switching methods used in related technologies typically display a loading interface or animation effect on the display interface to obscure the scene loading process. This prevents users from experiencing a smoother scene switching process. Users can clearly perceive a sense of obstruction and lag, which reduces the user experience. Summary of the Invention

[0005] The purpose of the embodiments of the present invention is to provide a virtual scene switching method, apparatus, device and storage medium, which can improve the smoothness of virtual scene switching by directly switching the camera perspective of the first scene and the second scene during the scene switching process.

[0006] To achieve the above objectives, an embodiment of the present invention provides a virtual scene switching method, comprising:

[0007] Obtaining position information of a virtual character in a virtual scene; wherein the virtual scene includes a plurality of scenes with cameras;

[0008] When it is detected that the virtual character enters the second scene from the first scene, the camera perspective of the virtual character is switched from the camera perspective of the first scene to the camera perspective of the second scene to display the scene content of the second scene.

[0009] Optionally, after obtaining the position information of the virtual character in the virtual scene, the method further includes:

[0010] When it is detected that the distance between the position of the virtual character in the first scene and any portal is less than or equal to a preset distance threshold, the camera of the first scene and the camera of the target second scene are associated with each other in perspective so that the rotation angle of the camera of the target second scene is consistent with the rotation angle of the camera of the first scene; wherein, the target second scene is the second scene within the viewing angle of the camera of the first scene.

[0011] Optionally, each of the scenes is provided with at least one portal that triggers a transition to another scene;

[0012] After obtaining the position information of the virtual character in the virtual scene, the method further includes:

[0013] When it is detected that the distance between the position of the virtual character in the first scene and any portal is less than or equal to a preset distance threshold, loading the scene content of the second scene corresponding to the portal;

[0014] The scene content corresponding to the second scene is displayed through the transmission portal.

[0015] Optionally, displaying scene content corresponding to the second scene through the transmission portal includes:

[0016] Obtaining a texture map of the second scene corresponding to the portal;

[0017] The portal is assigned a color using a shader according to the texture map of the second scene.

[0018] Optionally, the method further includes:

[0019] When it is detected that the distance between the position of the first scene where the virtual character is located and any transmission gate is greater than the distance threshold, the scene content of the second scene corresponding to the transmission gate is hidden.

[0020] Optionally, each of the transmission gates has a corresponding distance threshold, and the distance threshold is proportional to the memory of the scene corresponding to the corresponding transmission gate.

[0021] Optionally, after the virtual character enters the second scene from the first scene, the method further includes:

[0022] When it is detected that the virtual character stays in the second scene for longer than a preset time, and the distance between the virtual character and the portal is greater than a distance threshold corresponding to the portal, the first scene is hidden.

[0023] Optionally, after the virtual character enters the second scene from the first scene, the method further includes:

[0024] When it is detected that the virtual character stays in the second scene for longer than a preset time and the distance between the virtual character and the portal is greater than a distance threshold corresponding to the portal, the first scene is set as a common scene.

[0025] Optionally, after the virtual character enters the second scene from the first scene, the method further includes:

[0026] When detecting that the virtual character returns from the second scene to the first scene, recording the target angle of the camera of the second scene immediately before the virtual character returns to the first scene;

[0027] Adjusting the angle of the camera of the first scene to the target angle;

[0028] After detecting that the virtual character enters the first scene, the camera perspective is switched to a camera of the first scene to display the scene content of the first scene.

[0029] Optionally, after detecting that the virtual character enters the first scene, the method further includes:

[0030] The camera of the second scene is restored to its initial state.

[0031] Optionally, each of the cameras is configured with a layer filtering function to enable the camera to render its pre-assigned layer when loading the corresponding scene content.

[0032] Optionally, the spatial distance between the second scene and the first scene is greater than a spatial distance threshold to avoid overlapping display of scene content of the first scene and scene content of the second scene.

[0033] Optionally, the method further includes any of the following:

[0034] Setting the scene where the virtual character first appears as a permanent display scene;

[0035] Set the scene that meets the preset always-on scene type as the always-on scene.

[0036] Optionally, the method further includes:

[0037] After detecting that the virtual character has logged off from the virtual scene, obtaining the cumulative length of stay and number of entries of the virtual character in each virtual scene during the process of entering the virtual scene;

[0038] Calculate the usage rate of the corresponding virtual scene based on the accumulated stay time and number of entries;

[0039] If the usage rate is greater than a preset usage rate threshold, the virtual scene is set as a constantly displayed scene when the virtual character enters the corresponding virtual scene next time;

[0040] If the usage rate is less than or equal to the usage rate threshold, the virtual scene is set as a very prominent scene when the user enters the corresponding virtual scene next time.

[0041] To achieve the above-mentioned purpose, an embodiment of the present invention further provides a virtual scene switching device, comprising:

[0042] A virtual character position information acquisition module is used to obtain the position information of the virtual character in the virtual scene; wherein the virtual scene includes a plurality of scenes with cameras;

[0043] The camera control module is used to switch the camera perspective of the virtual character from the camera perspective of the first scene to the camera perspective of the second scene when detecting that the virtual character enters the second scene from the first scene, so as to display the scene content of the second scene.

[0044] Optionally, the camera control module is also used to: when it is detected that the distance between the position of the virtual character in the first scene and any portal is less than or equal to a preset distance threshold, associate the perspectives of the camera of the first scene and the camera of the target second scene so that the rotation angle of the camera of the target second scene is consistent with the rotation angle of the camera of the first scene; wherein, the target second scene is the second scene within the viewing angle of the camera of the first scene.

[0045] Optionally, the camera control module is also used to: when detecting that the virtual character returns from the second scene to the first scene, record the target angle of the camera of the second scene just before the virtual character returns to the first scene; adjust the angle of the camera of the first scene to the target angle; after detecting that the virtual character enters the first scene, restore the camera of the second scene to its initial state, and switch the camera perspective to the camera of the first scene to display the scene content of the first scene.

[0046] Optionally, the device further comprises:

[0047] The scene content hiding module is used to hide the scene content of the second scene corresponding to the transmission portal when it is detected that the distance between the position of the first scene where the virtual character is located and any transmission portal is greater than the distance threshold.

[0048] To achieve the above objectives, an embodiment of the present invention further provides a virtual scene switching device, comprising a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein when the processor executes the computer program, the virtual scene switching method as described in any of the above embodiments is implemented.

[0049] To achieve the above-mentioned purpose, an embodiment of the present invention further provides a computer-readable storage medium, which includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute the virtual scene switching method as described in any of the above embodiments.

[0050] The virtual scene switching method, device, equipment and storage medium disclosed in the present invention simulate the user's perspective by setting a scene camera in each scene in the virtual scene, and directly switching the camera perspective of the first scene and the second scene during the scene switching process, thereby improving the smoothness of the virtual scene switching. In addition, for each scene, there is at least one triggering portal to another scene. Since the portal can display the scene content of the second scene when the virtual character approaches the second scene, the user will not perceive that there is any obstruction in front, and the scene content of the second scene can be loaded in advance. Before the user passes through the portal, the scene content of the second scene has been loaded. Therefore, there is no need to display a loading interface or animation effect in the display interface to block the scene loading process, which can improve the smoothness of the virtual scene switching and achieve the effect of seamless switching of virtual scenes. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] FIG1 is a flow chart of a virtual scene switching method provided by an embodiment of the present invention;

[0052] FIG2 is a schematic diagram of scene division of a virtual scene provided by an embodiment of the present invention;

[0053] FIG3 is a schematic diagram of a camera viewing angle range provided by an embodiment of the present invention;

[0054] FIG4 is a schematic diagram showing the effect of a portal provided by an embodiment of the present invention;

[0055] FIG5 is a flowchart of a shader provided by an embodiment of the present invention;

[0056] FIG6 is a schematic diagram of perspective switching of a portal provided by an embodiment of the present invention;

[0057] FIG7 is a diagram of a display interface presented from a camera perspective of a first scene provided by an embodiment of the present invention;

[0058] FIG8 is a diagram of a display interface presented from a camera perspective of a second scene provided by an embodiment of the present invention;

[0059] 9 is a flowchart of another virtual scene switching method provided by an embodiment of the present invention;

[0060] 10 is a block diagram of a virtual scene switching device provided by an embodiment of the present invention;

[0061] FIG11 is a structural block diagram of a virtual scene switching device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0062] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.

[0063] Referring to FIG. 1 , FIG. 1 is a flow chart of a virtual scene switching method provided by an embodiment of the present invention, wherein the virtual scene switching method includes:

[0064] S1. Obtaining the position information of the virtual character in the virtual scene;

[0065] S2. When it is detected that the virtual character enters the second scene from the first scene, the camera perspective of the virtual character is switched from the camera perspective of the first scene to the camera perspective of the second scene to display the scene content of the second scene.

[0066] It is worth noting that the virtual scene switching method described in the embodiment of the present invention is implemented by a server, and the virtual scene is a 3D scene or a metaverse scene, such as a game scene, a virtual meeting scene, etc. The virtual scene can present a corresponding display interface on a terminal device (such as a virtual reality (VR) device).

[0067] Referring to FIG2 , FIG2 is a schematic diagram of scene division of a virtual scene provided by an embodiment of the present invention. The virtual scene includes several scenes with cameras, each of which is associated with a camera. A one-to-one correspondence with the scene is achieved by directly setting the camera in the scene. The camera of the scene can be set at any position in the scene, such as usually being set near the location where the scene has an entrance. Each camera has its corresponding initial coordinates and orientation in the initial state. Scenes 1 to 5 shown in FIG2 are respectively provided with cameras A to E. All scene materials in the scene can be seen through the cameras. Before the virtual character enters any scene, the camera position in the scene remains unchanged and is maintained at the initial coordinates. After the virtual character enters the scene, the camera moves with the virtual character. At this time, the camera is a camera that follows the virtual character or a first-person perspective camera.

[0068] Specifically, each of the scenes is provided with at least one portal that triggers a transition to another scene. This portal is the "door" in the scene. For example, there are four "doors" in the scene 1, which lead to the corresponding four scenes respectively. Each of the scenes is provided with scene materials, and the scene content of the scene is constituted by these scene materials, such as the rectangles, triangles and irregular shapes in Figure 2. It can be understood that the graphics in Figure 2 are only examples. In actual virtual scenes, these scene materials can be furniture, buildings, animals and plants, etc. When the virtual character needs to switch from one scene to another, the transition is triggered through the portal. When the user controls the virtual character to walk, run, fly, jump, etc. through the portal, the transition to another scene can be triggered. The system can monitor the position coordinates of the virtual character in real time and determine whether the virtual character touches the portal (i.e., is within the coverage of the portal) based on the position coordinates. If the virtual character touches the portal, the scene switch is triggered.

[0069] Refer to Figure 3, which is a schematic diagram of the camera viewing angle range provided by an embodiment of the present invention. The camera is provided with a near section and a far section. The near section is the section closest to the camera, indicating the closest picture that the camera can capture. The far section is the section farthest from the camera, indicating the farthest picture that the camera can capture. The area between the near section and the far section is the camera's field of view (viewing angle range), and the scene within the field of view can be captured by the camera. In an embodiment of the present invention, in order to make the transition natural when passing through the portal and not produce a connected picture between scenes, the near section distance value is set to the minimum value (0.01). The near section distance value represents the distance between the camera position and the near section, that is, the primitives with a distance to the camera less than 0.01 will not be displayed. This value cannot be too small, otherwise it will affect the imaging effect of the camera. The far section distance value can be adjusted according to needs. The system can set a more appropriate far section distance value by default. Of course, the user can also adjust this far section distance value by himself. If the user wants to see more distant scene content, the far section distance value can be increased by himself. However, as the far section distance value is adjusted to a larger value, the imaging will be more blurred. Conversely, if the field of view is blurred when the far section distance value is increased, the user hopes to see the scene content more clearly, and can adjust the far section distance value by himself.

[0070] Specifically, in step S1, the position information of the virtual character in the virtual scene is obtained. It is understandable that the virtual scene contains rigid bodies (such as buildings, plants, etc.) and / or non-player characters (NPCs) fixed in the scene. The virtual scene can accommodate at least one virtual character (multiple users can enter). In order to distinguish the user's virtual character, the virtual character can be bound to the user's identity document (ID). When the user enters the virtual scene, the system will record the position information of the virtual character corresponding to the user in the virtual scene. For example, each scene in the virtual scene corresponds to a coordinate system, and the virtual character position coordinates (such as three-dimensional coordinates) can be generated in real time. When the virtual character moves, the position information can be updated in time.

[0071] Specifically, in step S2, when it is detected that the virtual character enters the second scene from the first scene, the camera perspective of the virtual character is switched from the camera perspective of the first scene to the camera perspective of the second scene to display the scene content of the second scene.

[0072] Exemplarily, each of the scenes is provided with at least one portal that triggers a transition to another scene. The virtual character travels to another scene through a crossing trigger connected to the portal. The entrance to the scene is set as a crossing trigger and associated with the portal. The crossing trigger can call the camera bridge bridging function and trigger the switching of scenes. Therefore, when crossing this portal, the camera perspective can be switched to another scene. The crossing trigger is associated or bound to the "door" by checking the trigger (Is Trigger) property in the "door" physical properties in the 3D engine. The virtual character travels to the second scene through the crossing trigger of the second scene connected to the "door", that is, the crossing of the virtual character's position is achieved. The camera bridge blocks the camera of the first scene and activates the camera of the second scene, switching the camera perspective to the camera perspective of the second scene. The scene content of the second scene is displayed within the user's visual range, thereby completing the scene switching.

[0073] In an embodiment of the present invention, an application of the camera bridge when switching scenes is provided. The camera bridge is set as follows: create a rendering texture (Render Texture) of the second scene as _RT; create a camera (Camera) of the second scene, and assign the created _RT to this camera; obtain the camera _Main Camera (first scene camera or character camera) of the first scene; the update (Update) function synchronizes the camera orientation of the second scene to be equal to the orientation of the main camera; call the bridge (Cross Bridge) function, when the camera bridge parameter is Enter is true, it means entering the second scene, at this time, the camera of the second scene is set to the camera of the first scene or the character camera, and the original camera of the first scene is invalid; when the camera bridge parameter is Enter is false, the original camera of the first scene is activated, the camera position of the first scene is the same as before the invalidation, and the orientation is set to the orientation of the camera of the second scene, and then the camera of the second scene is invalidated and set to the initial state.

[0074] In an embodiment of the present invention, when a virtual character enters a second scene from a first scene, the camera perspective of the virtual character is switched from the camera perspective of the first scene to the camera perspective of the second scene to display the scene content of the second scene. After the virtual character enters the second scene, the entire scene content of the second scene can be seen, which can improve the smoothness of the virtual scene switching and achieve the effect of seamless switching of virtual scenes.

[0075] Specifically, after executing step S1 and before executing step S2, the method further includes:

[0076] S11, when it is detected that the distance between the position of the virtual character in the first scene and any portal is less than or equal to a preset distance threshold, loading the scene content of the second scene corresponding to the portal;

[0077] S12. Displaying scene content corresponding to the second scene through the transmission portal.

[0078] Specifically, in step S11, when it is detected that the distance between the position of the virtual character in the first scene and any portal is less than or equal to a preset distance threshold, the scene content of the second scene corresponding to the portal is loaded. Furthermore, when it is detected that the distance between the position of the virtual character in the first scene and any portal is greater than the distance threshold, the scene content of the second scene corresponding to the portal is hidden.

[0079] For example, the scene in which the virtual character resides is the first scene. The user can observe the first scene through a camera set in the first scene. The camera perspective of the first scene is the user's perspective. When the user controls the virtual character to move in the first scene, the camera of the first scene will move with the user's movement. It is understandable that before the virtual character enters this first scene, the camera of the first scene remains in its initial position, such as behind the door leading to the first scene or in the center of the first scene. As shown in Figure 2, when the virtual character is in Scene 1, Scene 1 is the first scene, and Camera A is the camera of the first scene, i.e., the user's perspective camera. At this time, the distance between the virtual character's current position and all portals in the first scene is detected, that is, the distance between the virtual character's position and doors 1 to 4 is detected. When the distance between the virtual character's position in the first scene and any portal is less than or equal to a preset distance threshold, it means that the virtual character is relatively close to the portal and may need to pass through the portal to reach the second scene, so the scene content of the second scene corresponding to the portal needs to be preloaded; conversely, when the distance between the virtual character's position in the first scene and any portal is greater than the distance threshold, it means that the virtual character is relatively far from the portal and may not need to pass through the portal to reach the second scene, so the scene content of the second scene corresponding to the portal continues to be hidden. As shown in Figure 2, assuming that the virtual character is currently located at the position of camera A (the virtual character can also be within a certain range in front of camera A), the distance between the virtual character and doors 2 and 3 is less than the distance threshold, and the distance between the virtual character and doors 1 and 4 is greater than the distance threshold, then the two second scenes, scene 3 and scene 4, are preloaded, and scene 2 and scene 5 are hidden.

[0080] In an embodiment of the present invention, since the portal can display the scene content of the second scene as the virtual character approaches the second scene, the user will not perceive any obstruction in front, and the scene content of the second scene can be loaded in advance, the scene content of the second scene has been loaded before the user passes through the portal. Therefore, there is no need to display a loading interface or animation effect in the display interface to block the scene loading process, which can improve the smoothness of virtual scene switching and achieve the effect of seamless switching of virtual scenes. In addition, considering that loading multiple scenes simultaneously will consume a large amount of computer resources, when the virtual character is far away from a second scene, the second scene can be hidden to reduce computer resource overhead.

[0081] Specifically, in step S12, the scene content corresponding to the second scene is displayed through the portal.

[0082] Exemplarily, the scene content of the second scene can be pre-stored in the system. When the first scene is loaded, the scene content of the second scene corresponding to this portal will be synchronously mapped to the portal to simulate the display of the second scene. At this time, the scene content of the second scene with a three-dimensional effect is displayed on the portal. As shown in Figure 2, when the user enters scene 1, the scene content corresponding to the second scene is already displayed in doors 1 to 4, and when scene 5 needs to be loaded, door 5 included in scene 5 is loaded together. At this time, door 5 displays the scene content of another scene, so the user will not perceive any obstruction in front of the view. The presentation effect of the portal can be referred to Figure 4.

[0083] Furthermore, the size and shape of the portal are set according to the scene content of the actual virtual scene. For example, this shape can be a circle, rectangle or irregular shape, etc., which can be determined by the size and shape of the space facing the first scene in the corresponding second scene. For example, if the second scene is modeled as a larger cube (such as a large world exploration game, the second scene needs to accommodate more scene materials), then the corresponding portal set in the first scene to the second scene is larger in size and is also a square. The portal seen from the user's perspective also displays more scene content (not necessarily all of the scene content of the second scene, only part of it can be seen), and the user can also know that the map of the second scene to be visited is relatively large, which can avoid the user feeling abrupt during the scene switching process and improve the user experience. Alternatively, for virtual scenes with a high degree of similarity between some scattered scenes (such as virtual meeting scenes), since the modeling of each conference room is similar, portals of the same size and shape can be used.

[0084] It is worth noting that image mapping, texture mapping or other methods capable of presenting display effects can be used to display the scene content corresponding to the second scene on the portal, and the portal is a perspective layer.

[0085] This embodiment of the present invention provides a method for utilizing texture mapping to display scene content corresponding to the second scene on the portal. By directly modifying the portal's material shader within a 3D engine to a planar perspective shader (planar perspective shader), this shader can be applied to the portal. In this case, step S12 specifically includes: obtaining a texture map of the second scene corresponding to the portal; and assigning a color to the portal using a shader based on the texture map of the second scene.

[0086] Exemplarily, in an embodiment of the present invention, all cameras are bound by using a camera bridge. The camera bridge is a functional code that implements binding with each camera through the code. The camera bridge uses the camera of the second scene to obtain the three-dimensional scene content in the second scene, and creates a texture map (Render Texture) of the scene content based on the scene content. The texture map is a type of storage map that is created in memory through code to store the image rendered by the camera of the scene. Each scene camera has its own map object when activated. The camera bridge assigns a value to the two-dimensional portal based on the texture map, so that the "door" can be made transparent, and the scene content in the second scene can be displayed through the "door".

[0087] Refer to Figure 5, which is a shading flow chart of the shader provided by an embodiment of the present invention. The shader includes a vertex shader and a fragment shader. After receiving the texture map passed to it by the system, the vertex shader processes the texture map into the data required by the subsequent fragment shader, and finally outputs the picture presented on the portal to obtain a 3D stereoscopic perspective effect of the second scene. The vertex shader obtains the vertex coordinates of each texture map. In the rendering pipeline, a vertex must undergo transformations in multiple coordinate spaces before it can finally be presented on the screen. Therefore, the vertex shader converts the vertex coordinates from local coordinates to the homogeneous clipping space. The goal of the homogeneous clipping space is to be able to easily clip rendered primitives. For example, primitives that are completely inside this space will be retained, primitives that are completely outside this space will be removed, and primitives that intersect with the boundary of this space will be clipped. After passing through the homogeneous clipping space, some unnecessary vertices in this space can be discarded, which plays a role in filtering invalid data. Then, the vertex coordinates under the homogeneous clipping space are converted to screen coordinates under the homogeneous space, and this screen coordinate is transmitted to the fragment shader for subsequent processing. The fragment shader performs homogeneous operations on the screen coordinates, calculates UV coordinates based on the screen coordinates after the homogeneous operations, and then samples the texture map based on the UV coordinates, such as using the screen space (Screen / Eye Space) coordinates as UV to sample the texture map, obtain the pixel color of the texture map, and assign the portal based on the pixel color.

[0088] In this embodiment of the present invention, as the avatar approaches the second scene, the portal can display the scene content of the second scene, and the user will not perceive any obstruction in front. In addition, by using a shader to assign colors to the portal based on a texture map, three-dimensional scene content can be displayed on the two-dimensional portal. The editability of the shader allows for a variety of image effects without being limited by the graphics card's fixed rendering pipeline, greatly improving image quality and enabling the portal to display scene content with higher definition.

[0089] Furthermore, the scenes described in the embodiments of the present invention need to be set in parallel. Since the camera of the first scene cannot see any second scene, and the camera of the second scene cannot see any content of the first scene, "parallel" scenes can be simulated by setting layer filtering or setting a larger spatial distance.

[0090] In a first embodiment, each of the cameras is configured with a layer filtering function to enable the camera to render its pre-assigned layer when loading the corresponding scene content.

[0091] For example, layer filtering (Layer): Layer is a property in 3D engines that is used to layer target objects. The camera can specify the rendering layer to render part of the objects in the scene. The layer filtering function is set in the 3D engine. For example, in the Unity3D engine, there is a "Culling Mask" property for the camera. You can set the layer filtering by pulling down and checking the Layer layer. For other 3D objects, the "Layer" layer property can be directly set to the Layer layer to which it belongs. For example, if the layer of the first scene is marked as Layer1, and the layer of the second scene is marked as Layer2, filtering Layer1 means that only the second scene is displayed, so the pictures of the first scene and the second scene will not overlap in the user's perspective.

[0092] In a second embodiment, the spatial distance between each scene is greater than a preset spatial distance threshold.

[0093] For example, in order to avoid seeing the scene content of the second scene (this second scene has been loaded in advance) within the field of view of the first scene camera, the spatial distance between the second scene and the first scene can be set to be greater than the spatial distance threshold. At this time, the camera of the first scene cannot see any second scene, and the camera of the second scene cannot see any content of the first scene.

[0094] In an embodiment of the present invention, a hierarchical filtering method or a larger spatial distance method can avoid overlapping display of scene contents of two scenes in the user's camera, and will not cause element overlap, field of view confusion, etc., thereby improving the user's visual experience.

[0095] Furthermore, in an embodiment of the present invention, each of the transmission gates has a corresponding distance threshold, and the distance threshold is determined by the memory of the scene corresponding to the transmission gate, and the distance threshold is in direct proportion to the memory of the scene.

[0096] For example, when the scene contains more scene materials, it occupies more memory and takes longer to load, so the distance threshold corresponding to the portal that triggers the passage to this scene can be set to be larger; conversely, when the scene contains fewer scene materials, it occupies less memory and takes shorter to load, so the distance threshold corresponding to the portal that triggers the passage to this scene can be set to be smaller. A standard scene model can be preset in the system. This standard scene model can accommodate scene materials within a preset memory range, and the distance threshold corresponding to this standard scene model is the standard distance threshold. When the memory occupied by any scene is exactly within this memory range, the corresponding distance threshold is the standard distance threshold; when the memory occupied by any scene exceeds the upper limit of this memory range, the corresponding distance threshold is greater than the standard distance threshold; conversely, when the memory occupied by any scene is lower than the lower limit of this memory range, the corresponding distance threshold is less than the standard distance threshold. As shown in Figure 2, scene 4 has a large amount of scene materials. Assuming that the memory it occupies exceeds the upper limit of the memory range, it will take a long time to load this scene 4. In order to avoid the scene not being fully loaded before the user arrives at the "door", the distance threshold of the transmission gate corresponding to door 3 can be set to be greater than the standard distance threshold. At this time, a distance adjustment value can be superimposed on the basis of the standard distance threshold. The distance adjustment value can be determined by the difference (absolute value) between the memory occupied by this scene and the memory occupied by the standard scene model, and is proportional to the absolute value of this difference. No specific numerical limit is given here.

[0097] In an embodiment of the present invention, a distance threshold that triggers the loading of scene content is set for the scene memory of different scenes, so that the second scene that the virtual character may need to enter can be loaded at an appropriate time point, and the second scene will not be loaded too early, resulting in the occupation of computer resources. It can also be ensured that the scene content of the second scene has been fully loaded when the virtual character arrives at the second scene, and the user will not be aware of the loading process of the scene.

[0098] Furthermore, after obtaining the position information of the virtual character in the virtual scene in step S1, the method further includes:

[0099] When it is detected that the distance between the position of the virtual character in the first scene and any portal is less than or equal to a preset distance threshold, the camera of the first scene and the camera of the target second scene are associated in perspective so that the rotation angle of the camera of the target second scene is consistent with the rotation angle of the camera of the first scene; wherein, the target second scene is the second scene within the perspective range of the camera of the first scene.

[0100] Exemplarily, the main camera moves or changes the angle of the camera perspective in the first scene according to the user's control operation. Since the camera bridge is bound to the camera of the first scene and the camera of the second scene, the association between the two cameras has been achieved through the camera bridge. When the camera of the first scene moves or the perspective changes, the orientation of the camera of the target second scene changes with the perspective of the camera of the first scene, but the initial position of the camera of the target second scene in the scene remains unchanged (because the virtual character has not yet entered the target second scene, and only after entering the target second scene will the camera of the target second scene move with the movement of the virtual character). That is, after the camera of the first scene is bridged with the camera of the target second scene, when the user is in the first scene, the perspective of the camera of the target second scene changes with the camera of the first scene, while the position does not change. The user can move in the first scene and observe the three-dimensional scene content of the target second scene from different angles through the 2D plane "door". The 2D plane "door" displays a 3D scene. In addition, after the rotation angle of the camera of the second scene is consistent with the rotation angle of the camera of the first scene, the display angle seen by the user on the portal can be consistent with the display angle of the target second scene seen after passing through the target second scene. The user can see the pictures inside the door from different angles from all angles outside the door, and when passing through this "door", the passage is seamless without any interruption, so that the user will not perceive that a scene switch has occurred, which can improve the fluency of the virtual scene switch and achieve the effect of seamless switching of virtual scenes.

[0101] See Figure 6, which is a schematic diagram of perspective switching for a portal provided by an embodiment of the present invention. The left image shows the perspective of looking through the "door" toward the left side of the second scene, the middle image shows the perspective of looking through the "door" toward the center of the second scene, and the right image shows the perspective of looking through the "door" toward the right side of the second scene. The user's perspective of the portal varies depending on the perspective, remaining consistent with the perspective of looking through a door or window in the real world. This enhances the realism of the virtual scene and allows the user to experience it immersively. See Figure 7, which is a diagram of a display interface presented from the camera perspective of a first scene provided by an embodiment of the present invention. At this point, the avatar is still in the first scene and sees the scene content of the second scene presented by the portal, i.e., the image displayed by the "door." See Figure 8, which is a diagram of a display interface presented from the camera perspective of a second scene provided by an embodiment of the present invention. After the avatar enters the second scene, only the scene content of the second scene is displayed, and the scene camera in the second scene moves as the avatar moves.

[0102] Specifically, referring to FIG. 9 , FIG. 9 is a flow chart of another virtual scene switching method provided by an embodiment of the present invention. After executing step S2, the method further includes:

[0103] S3. When it is detected that the virtual character returns from the second scene to the first scene, record the target angle of the camera of the second scene immediately before the virtual character returns to the first scene;

[0104] S4. Adjusting the angle of the camera of the first scene to the target angle;

[0105] S5. After detecting that the virtual character enters the first scene, switch the camera perspective to a camera of the first scene to display the scene content of the first scene.

[0106] For example, in an embodiment of the present invention, considering that after entering the second scene, a user may stay in the second scene for a short time before exiting, or even if they stay for a longer time, they may continue to approach the "door" of the second scene, i.e., the portal that leads back to the first scene. This indicates that the user is likely to need to return to the first scene within a short period of time. Therefore, after detecting that the user has entered the second scene, even if the user has moved away from the "door", the first scene will not be hidden for a preset time period, such as 2 minutes, to avoid repeated loading of the first scene. When the avatar is detected to have passed through the portal and returned to the first scene, the target angle of the camera of the second scene is recorded immediately before the avatar passes through the portal. Since the camera angle of the first scene is controlled by the user before the avatar enters the second scene, the angle of the camera of the first scene is adjusted to the target angle. This ensures that the perspective remains consistent when switching between the first and second scene cameras when exiting the second scene, avoiding the resulting discontinuous image caused by different scene angles and a degraded user experience. After detecting that the avatar has entered the first scene, the camera of the second scene is blocked and the camera perspective is switched to that of the camera of the first scene to display the scene content of the first scene.

[0107] Furthermore, after the user enters the second scene, if the length of stay exceeds the preset time and the distance between the virtual character's position and the portal is greater than the distance threshold, it means that the user is far away from the first scene and stays in the second scene for a long time. He will not return to the first scene immediately in a short time (he may go from the second scene to another scene, such as going from door 5 of scene 5 to another scene in Figure 2). In this case, the first scene can be hidden, and the second scene can be used as the first scene (the scene where the user is), and the above steps S1 to S2 can be executed again.

[0108] Furthermore, the first scene can also be displayed without being hidden. For example, if this first scene is set as a commonly used scene, there is no need to hide the first scene. In addition, for the scene where the user's virtual character first appears (such as the starting point in the game, the subsequent user may need to return to this scene multiple times in the virtual scene), this scene is also a constantly displayed scene and does not need to be hidden. For constantly displayed scenes, there is no need to perform the above steps S1 to S2, but the scene content still needs to be displayed on the corresponding portal. In the embodiment of the present invention, three methods are provided to determine whether a scene is a constantly displayed scene, one is a system-fixed setting method, the second is a user-defined method, and the third is a dynamic adjustment method.

[0109] In the first embodiment, for each virtual scene, the system obtains the scene type of each scene. Scenes that meet the preset always-displayed scene type are set as always-displayed scenes, while the remaining scenes are set as very-displayed scenes. For example, if the virtual scene is a 3D game scene, the always-displayed scene types include the main city scene and the supply station scene. For example, if the virtual scene is a simulated library scene, the always-displayed scene is the virtual character's "birth" scene (for example, the library entrance).

[0110] In the second embodiment, the user can define which scenes in the virtual scene are always visible and which are not. This customization must be consistent with the system's supported memory and the number of settings is limited.

[0111] In a third embodiment, the always-displayed scene can be dynamically adjusted. In this case, the virtual scene switching method described in the embodiment of the present invention also includes: after detecting that the user has logged off from the virtual scene, counting the cumulative stay time and number of entries in each scene during this entry into the virtual scene; calculating the usage rate of this scene based on the cumulative stay time and number of entries; if the usage rate is greater than a preset usage rate threshold, then the scene is set as the always-displayed scene the next time the user enters the virtual scene; if the usage rate is less than or equal to the usage rate threshold, then the scene is set as the very visible scene the next time the user enters the virtual scene.

[0112] Exemplarily, the usage rate threshold can be set according to an empirical value. The method for calculating the usage rate of the scenario based on the cumulative stay time and the number of entries includes: converting the cumulative stay time into a duration coefficient, obtaining a corresponding duration weight based on the duration coefficient, calculating the product of the duration coefficient and the duration weight, obtaining a number weight corresponding to the number of entries, calculating the product of the number of entries and the number weight, and accumulating these two products to obtain the usage rate of the scenario.

[0113] It is worth noting that for some virtual scenes with the "reading bar" function, the user's online location each time is the same as the location when the user last logged off. At this time, when the user exits the virtual scene, it is necessary to set the scene before exiting as the "birth" scene when logging into the virtual scene next time. This scene can be loaded during the user login process. This scene can be a constantly displayed scene or a very visible scene, which can be hidden or constantly displayed when the user leaves.

[0114] In an embodiment of the present invention, the user can customize which scenes are always displayed, or use the system default always displayed scene mode. The always displayed scenes will not be hidden, so as to avoid the system repeatedly loading the user's commonly used scenes and causing system freezes; or the system can count which scenes are commonly used scenes based on the frequency and time of the user's use of each scene when entering the virtual scene in the past, and then set this commonly used scene as the always displayed scene. The system can dynamically adjust which scenes are commonly used scenes to suit the user's actual usage.

[0115] Furthermore, after detecting that the virtual character enters the first scene, the method further includes: restoring the camera of the second scene to an initial state.

[0116] For example, since the user has entered and exited the second scene once, in the actual application of the virtual scene, the user most likely does not need to return to the second scene again, so the camera of the second scene can be restored to its initial state.

[0117] The virtual scene switching method disclosed in the embodiment of the present invention simulates the user's perspective by setting a scene camera in each scene in the virtual scene, and directly switches the camera perspective of the first scene and the second scene during the scene switching process, thereby improving the smoothness of the virtual scene switching. In addition, for each scene, there is at least one triggering portal to another scene. When it is detected that the virtual character is in the first scene and the distance between the virtual character and any portal of the first scene is less than or equal to the distance threshold, the scene content of the second scene corresponding to this portal is displayed on this portal to simulate the scene content of the second scene. The user will not perceive any obstruction in front of the perspective. At the same time, the scene content of the second scene corresponding to this portal is loaded in the background. Before the user passes through the portal to enter the second scene, since the scene content of the second scene has been loaded, the user can see all the scene content of the second scene after entering the second scene, which can improve the smoothness of the virtual scene switching and achieve the effect of seamless switching of virtual scenes.

[0118] 10 , which is a structural block diagram of a virtual scene switching device 100 provided in an embodiment of the present invention, the virtual scene switching device 100 includes:

[0119] A virtual character position information acquisition module 11 is used to obtain the position information of the virtual character in the virtual scene; wherein the virtual scene includes a plurality of scenes with cameras, and each of the scenes is provided with at least one portal that triggers a transmission to another scene;

[0120] The scene content loading module 12 is configured to load the scene content of the second scene corresponding to any of the transmission portals when it is detected that the distance between the location of the virtual character in the first scene and any of the transmission portals is less than or equal to a preset distance threshold; and display the scene content corresponding to the second scene through the transmission portal;

[0121] The camera control module 13 is configured to switch the camera perspective of the virtual character from the camera perspective of the first scene to the camera perspective of the second scene to display the scene content of the second scene when detecting that the virtual character enters the second scene from the first scene.

[0122] Specifically, the scene content loading module 12 is specifically configured to: obtain a texture map of the second scene corresponding to the transmission portal; and assign a color to the transmission portal using a shader according to the texture map of the second scene.

[0123] Specifically, the camera control module 13 is also used to: when it is detected that the distance between the position of the virtual character in the first scene and any portal is less than or equal to a preset distance threshold, associate the perspectives of the camera of the first scene and the camera of the target second scene so that the rotation angle of the camera of the target second scene is consistent with the rotation angle of the camera of the first scene; wherein, the target second scene is the second scene within the viewing angle of the camera of the first scene.

[0124] Specifically, each of the cameras is configured with a layer filtering function so as to enable the camera to render its pre-assigned layer when loading the corresponding scene content.

[0125] Specifically, the camera control module 13 is also used to: when detecting that the virtual character returns to the first scene from the second scene, record the target angle of the camera of the second scene just before the virtual character returns to the first scene; adjust the angle of the camera of the first scene to the target angle; after detecting that the virtual character enters the first scene, restore the camera of the second scene to its initial state, and switch the camera perspective to the camera of the first scene to display the scene content of the first scene.

[0126] Specifically, the virtual scene switching device 100 also includes: a scene content hiding module, which is used to hide the scene content of the second scene corresponding to the portal when it is detected that the distance between the position of the virtual character in the first scene and any portal is greater than the distance threshold.

[0127] It is worth noting that the working process of each module in the virtual scene switching device 100 according to the embodiment of the present invention can refer to the working process of the virtual scene switching method according to the above embodiment, and will not be repeated here.

[0128] The virtual scene switching device 100 disclosed in the embodiment of the present invention simulates the user's perspective by setting a scene camera in each scene in the virtual scene, and directly switches the camera perspective of the first scene and the second scene during the scene switching process, thereby improving the smoothness of the virtual scene switching. In addition, for each scene, there is at least one triggering portal to another scene. When it is detected that the virtual character is in the first scene and the distance between the virtual character and any portal of the first scene is less than or equal to the distance threshold, the scene content of the second scene corresponding to this portal is displayed on this portal to simulate the scene content of the second scene. The user will not perceive any obstruction in front of the perspective. At the same time, the scene content of the second scene corresponding to this portal is loaded in the background. Before the user passes through the portal to enter the second scene, since the scene content of the second scene has been loaded, the user can see all the scene content of the second scene after entering the second scene, which can improve the smoothness of the virtual scene switching and achieve the effect of seamless switching of virtual scenes.

[0129] Referring to FIG11 , FIG11 is a block diagram of a virtual scene switching device 200 provided in an embodiment of the present invention. The virtual scene switching device 200 includes a processor 21, a memory 22, and a computer program stored in the memory 22 and executable on the processor 21. When the processor 21 executes the computer program, the steps of the aforementioned virtual scene switching method embodiments, such as steps S1 to S5, are implemented.

[0130] Exemplarily, the computer program may be divided into one or more modules / units, which are stored in the memory 22 and executed by the processor 21 to implement the present invention. The one or more modules / units may be a series of computer program instruction segments capable of implementing specific functions, and the instruction segments are used to describe the execution process of the computer program in the virtual scene switching device 200.

[0131] The virtual scene switching device 200 may include, but is not limited to, a processor 21 and a memory 22. Those skilled in the art will appreciate that the schematic diagram is merely an example of the virtual scene switching device 200 and does not limit the virtual scene switching device 200. The virtual scene switching device 200 may include more or fewer components than shown in the diagram, or may combine certain components or different components. For example, the virtual scene switching device 200 may further include input and output devices, network access devices, buses, and the like.

[0132] The processor 21 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. The processor 21 is the control center of the virtual scene switching device 200, and utilizes various interfaces and lines to connect various parts of the entire virtual scene switching device 200.

[0133] The memory 22 can be used to store the computer programs and / or modules. The processor 21 implements the various functions of the virtual scene switching device 200 by running or executing the computer programs and / or modules stored in the memory 22 and calling the data stored in the memory 22. The memory 22 can mainly include a program storage area and a data storage area. The program storage area can store an operating system, at least one application required for a function (such as a sound playback function, an image playback function, etc.); the data storage area can store data created based on the use of the mobile phone (such as audio data, a phone book, etc.). In addition, the memory 22 can include a high-speed random access memory and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, at least one disk storage device, a flash memory device, or other volatile solid-state storage device.

[0134] Wherein, if the module / unit integrated in the virtual scene switching device 200 is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the process in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and when the computer program is executed by the processor 21, it can implement the steps of the above-mentioned various method embodiments. Wherein, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electrical carrier signal, telecommunication signal and software distribution medium, etc.

[0135] The above is a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications are also considered to be within the scope of protection of the present invention.

Claims

1. A virtual scene switching method, comprising: Acquire the position information of the virtual character in the virtual scene; wherein the virtual scene includes a plurality of scenes with cameras; When it is detected that the virtual character enters the second scene from the first scene, the camera perspective of the virtual character is switched from the camera perspective of the first scene to the camera perspective of the second scene to display the scene content of the second scene.

2. The virtual scene switching method according to claim 1, wherein: After obtaining the position information of the virtual character in the virtual scene, the method further includes: When it is detected that the distance between the position of the virtual character in the first scene and any portal is less than or equal to a preset distance threshold, the camera of the first scene and the camera of the target second scene are associated in perspective so that the rotation angle of the camera of the target second scene is consistent with the rotation angle of the camera of the first scene; wherein, the target second scene is the second scene within the viewing angle of the camera of the first scene.

3. The virtual scene switching method according to claim 1, wherein: Each of the scenes is provided with at least one portal that triggers a transmission to another scene; After obtaining the position information of the virtual character in the virtual scene, the method further includes: When it is detected that the distance between the position of the first scene where the virtual character is located and any portal is less than or equal to a preset distance threshold, loading the scene content of the second scene corresponding to the portal; The scene content corresponding to the second scene is displayed through the transmission portal.

4. The virtual scene switching method according to claim 3, wherein: The displaying the scene content corresponding to the second scene through the transmission portal includes: Obtaining a texture map of a second scene corresponding to the portal; The color of the portal is assigned using a shader according to the texture map of the second scene.

5. The virtual scene switching method according to claim 3, wherein: The method further comprises: When it is detected that the distance between the position of the first scene where the virtual character is located and any transmission gate is greater than the distance threshold, the scene content of the second scene corresponding to the transmission gate is hidden.

6. The virtual scene switching method according to claim 3, wherein: Each of the transmission gates has a corresponding distance threshold, and the distance threshold is proportional to the memory of the scene corresponding to the corresponding transmission gate.

7. The virtual scene switching method according to claim 6, wherein: After the virtual character enters the second scene from the first scene, the method further includes: When it is detected that the virtual character stays in the second scene for a period exceeding a preset time, and the distance between the virtual character and the portal is greater than a distance threshold corresponding to the portal, the first scene is hidden.

8. The virtual scene switching method according to claim 6, wherein: After the virtual character enters the second scene from the first scene, the method further includes: When it is detected that the virtual character stays in the second scene for longer than a preset time, and the distance between the virtual character and the portal is greater than a distance threshold corresponding to the portal, the first scene is set as a common scene.

9. The virtual scene switching method according to claim 1, wherein: After the virtual character enters the second scene from the first scene, the method further includes: When it is detected that the virtual character returns from the second scene to the first scene, recording the target angle of the camera of the second scene immediately before the virtual character returns to the first scene; Adjusting the angle of the camera of the first scene to the target angle; After detecting that the virtual character enters the first scene, the camera perspective is switched to a camera of the first scene to display the scene content of the first scene.

10. The virtual scene switching method according to claim 9, wherein: After detecting that the virtual character enters the first scene, the method further includes: The camera of the second scene is restored to an initial state.

11. The virtual scene switching method according to any one of claims 1 to 6, wherein: Each of the cameras is configured with a layer filtering function to enable the camera to render its pre-assigned layer when loading the corresponding scene content.

12. The virtual scene switching method according to any one of claims 1 to 6, wherein: The spatial distance between the second scene and the first scene is greater than a spatial distance threshold to avoid overlapping display of scene content of the first scene and scene content of the second scene.

13. The virtual scene switching method according to any one of claims 1 to 6, wherein: The method further comprises any of the following: Setting the scene where the virtual character first appears as a permanent display scene; Set a scene that matches the preset always-display scene type as the always-display scene.

14. The virtual scene switching method according to any one of claims 1 to 6, wherein: The method further comprises: After detecting that the virtual character has gone offline from the virtual scene, obtaining the cumulative length of stay and number of entries of the virtual character in each virtual scene during the process of entering the virtual scene; Calculate the usage rate of the corresponding virtual scene according to the accumulated stay time and the number of entries; If the usage rate is greater than a preset usage rate threshold, the virtual scene is set as a constantly displayed scene when the virtual character enters the corresponding virtual scene next time; If the usage rate is less than or equal to the usage rate threshold, the virtual scene is set as a very prominent scene when the user enters the corresponding virtual scene next time.

15. A virtual scene switching device, comprising: A virtual character position information acquisition module, used to acquire the position information of the virtual character in a virtual scene; wherein the virtual scene includes a plurality of scenes with cameras; The camera control module is used to switch the camera perspective of the virtual character from the camera perspective of the first scene to the camera perspective of the second scene to display the scene content of the second scene when it is detected that the virtual character enters the second scene from the first scene.

16. The virtual scene switching device according to claim 15, wherein: The camera control module is also used to: when it is detected that the distance between the position of the first scene where the virtual character is located and any portal is less than or equal to a preset distance threshold, associate the perspectives of the camera of the first scene and the camera of the target second scene so that the rotation angle of the camera of the target second scene is consistent with the rotation angle of the camera of the first scene; wherein the target second scene is the second scene within the viewing angle of the camera of the first scene.

17. The virtual scene switching device according to claim 15, wherein: The camera control module is also used to: when detecting that the virtual character returns from the second scene to the first scene, record the target angle of the camera of the second scene just before the virtual character returns to the first scene; adjust the angle of the camera of the first scene to the target angle; after detecting that the virtual character enters the first scene, restore the camera of the second scene to the initial state, and switch the camera perspective to the camera of the first scene to display the scene content of the first scene.

18. The virtual scene switching device according to claim 15, further comprising: The scene content hiding module is used to hide the scene content of the second scene corresponding to the portal when it is detected that the distance between the position of the first scene where the virtual character is located and any portal is greater than the distance threshold.

19. A virtual scene switching device, comprising a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor implements the virtual scene switching method as described in any one of claims 1 to 14 when executing the computer program.

20. A computer-readable storage medium comprising a stored computer program, wherein: When the computer program is running, the device where the computer-readable storage medium is located is controlled to execute the virtual scene switching method as described in any one of claims 1 to 14.

Citation Information

Patent Citations

  • Picture scene switching method and device, computer equipment and storage medium

    CN111586317A

  • Game scene conversion method and device, storage medium and computer equipment

    CN112933606A

  • Data processing system for space switching

    CN115177951A

  • Model information processing method and device, readable storage medium and electronic device

    CN116603235A

  • Virtual scene switching method and device, equipment and storage medium

    CN117707340A