Game virtual scene transformation method, electronic terminal and readable storage medium
By calculating the movement information of virtual objects in the game and maintaining their consistent state in the portal area, the problem of low realism in virtual scene transitions is solved, thus improving the game's realism and player experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-09-03
- Publication Date
- 2026-03-10
AI Technical Summary
The virtual scene transitions in existing games lack realism, and players lack a sense of realism when teleporting through portals.
By determining the movement information of the virtual object in the initial transformation area and calculating the initial output state based on this area, and replacing it with the output state of the target transformation area, the movement direction, speed, orientation and relative position of the virtual object when passing through the transformation area are kept unchanged, and the state after scene transformation is calculated using mirror processing.
It enhances the realism of virtual scene transitions and the gaming experience, allowing players to feel the continuity as they move through changing scene areas, thus improving the game's realism.
Smart Images

Figure CN118925223B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of game technology, and in particular to a method for transforming virtual game scenes, an electronic terminal, and a readable storage medium. Background Technology
[0002] In many games, virtual scenes frequently change, connecting different game environments. For example, a portal allows a virtual object to quickly travel from the current game scene to a distant target game scene, achieving the effect of spatial travel.
[0003] Currently, when virtual objects pass through the changing areas of a virtual scene, the effect is that the virtual object is instantly moved from the current game scene to the target game scene, resulting in a low level of realism for players experiencing virtual scene changes in the game. Summary of the Invention
[0004] The purpose of this invention is to provide a method, device, and electronic terminal for transforming virtual scenes in games, so as to alleviate the technical problem of low realism in the virtual scene transformation experience in games.
[0005] In a first aspect, embodiments of this application provide a method for transforming a virtual game scene. The three-dimensional game scene includes a scene transformation region and virtual objects, and the scene transformation region includes a starting transformation region and a target transformation region. The method includes:
[0006] In response to a transformation operation triggered by controlling the virtual object in the initial transformation area, the first movement information of the virtual object in the current game scene is determined, wherein the current game scene is the game scene corresponding to the initial transformation area, and the movement information includes at least one of the following: movement direction, movement speed, and current orientation;
[0007] Based on the starting transformation region, the initial transmission state of the first movement information relative to the starting transformation region is determined;
[0008] The reference of the initial output state is replaced with the target transformation region to obtain the target output state, and the target output state is converted into the second movement information in the target game scene corresponding to the target transformation region;
[0009] Based on the second movement information, the virtual object is controlled to display the target game scene corresponding to the target transformation area.
[0010] In one possible implementation, the movement information includes the direction of movement;
[0011] The first movement direction in the first movement information, relative to the incident direction of the starting transformation region, and the second movement direction in the second movement information, relative to the exit direction of the target transformation region, are on the same ray.
[0012] In one possible implementation, the movement information also includes movement speed;
[0013] The second moving speed in the second moving information is the result of multiplying the magnitude of the first moving speed in the first moving information by the second moving direction.
[0014] In one possible implementation, the movement information includes the current orientation;
[0015] The first current orientation in the first movement information, relative to the incident direction of the starting transformation region, and the second current orientation in the second movement information, relative to the exit direction of the target transformation region, are on the same ray.
[0016] In one possible implementation, the movement information also includes relative position;
[0017] The first relative position of the virtual object in the first movement information relative to the starting transformation region is the same as the second relative position of the virtual object in the second movement information relative to the target transformation region.
[0018] In one possible implementation, the step of determining the initial transmission state of the first movement information relative to the initial transformation region, based on the initial transformation region, includes:
[0019] The first moving direction is mirrored relative to a first longitudinal plane to obtain a first sub-moving direction relative to the starting transformation region, where the first longitudinal plane is perpendicular to the plane of the starting transformation region; the first sub-moving direction is mirrored relative to a second longitudinal plane to obtain a second sub-moving direction relative to the starting transformation region, where the second longitudinal plane is parallel to the plane of the starting transformation region; the second sub-moving direction is determined as the initial outgoing moving direction of the first moving information relative to the starting transformation region; or...
[0020] The first moving direction is mirrored relative to the second longitudinal plane to obtain a third sub-moving direction relative to the starting transformation region; the third sub-moving direction is mirrored relative to the first longitudinal plane to obtain a fourth sub-moving direction relative to the starting transformation region; the fourth sub-moving direction is determined as the starting outgoing moving direction of the first moving information relative to the starting transformation region.
[0021] In one possible implementation, the step of determining the initial transmission state of the first movement information relative to the initial transformation region, based on the initial transformation region, includes:
[0022] The first current orientation is mirrored relative to a first longitudinal plane to obtain a first sub-current orientation relative to the starting transformation region, where the first longitudinal plane is perpendicular to the plane of the starting transformation region; the first sub-current orientation is mirrored relative to a second longitudinal plane to obtain a second sub-current orientation relative to the starting transformation region, where the second longitudinal plane is parallel to the plane of the starting transformation region; the second sub-current orientation is determined as the initial outgoing orientation of the first movement information relative to the starting transformation region; or,
[0023] The first current orientation is mirrored relative to the second longitudinal plane to obtain a third sub-current orientation relative to the starting transformation region; the third sub-current orientation is mirrored relative to the first longitudinal plane to obtain a fourth sub-current orientation relative to the starting transformation region; the fourth sub-current orientation is determined as the starting outgoing orientation of the first movement information relative to the starting transformation region.
[0024] In one possible implementation, the step of determining the initial transmission state of the first movement information relative to the initial transformation region, based on the initial transformation region, includes:
[0025] Based on the first relative position, a mirror image is performed relative to the plane of the initial transformation region to obtain a third relative position relative to the initial transformation region.
[0026] The third relative position is determined as the initial transmission relative position of the first movement information relative to the initial transformation region.
[0027] In one possible implementation, before the step of determining the initial outgoing state of the first movement information relative to the initial transformation region, based on the initial transformation region, the method further includes:
[0028] The first movement information is converted into the initial input state of the virtual object in the current game scene relative to the initial transformation region.
[0029] In one possible implementation, the step of converting the target output state into second movement information in the target game scene corresponding to the target transformation region includes:
[0030] The target output state relative to the target transformation area is converted into the second movement information of the virtual object relative to the target game scene when it is in the target transformation area.
[0031] In one possible implementation, the 3D game scene further includes a transform region virtual camera, which is bound to the target transform region and faces the target game scene; the method further includes:
[0032] When the virtual object is in the current game scene, the target image corresponding to the three-dimensional game scene in the target game scene is acquired by the virtual camera in the transformation area;
[0033] The target image is rendered to obtain the target texture;
[0034] The target texture is applied to the area formed by the border of the initial transformation region, and the initial transformation region after applying the texture is displayed in the graphical user interface.
[0035] In one possible implementation, the step of acquiring the target image corresponding to the 3D game scene in the target game scene through the transformed region virtual camera includes:
[0036] Obtain the current starting position of the virtual object in the current game scene, determine the current target position in the target game scene relative to the target transformation area based on the current starting position, and determine the current target position as the current position of the virtual camera in the transformation area;
[0037] Obtain the first viewing direction of the virtual object facing the starting transformation area in the current game scene; determine the second viewing direction of the virtual object facing the target transformation area based on the first viewing direction; the first viewing direction relative to the incident direction of the starting transformation area and the second viewing direction relative to the incident direction of the target transformation area are on the same ray; determine the exit direction of the second viewing direction as the current orientation direction of the virtual camera in the transformation area;
[0038] The virtual camera in the transformation area, located at the current position and facing the current direction, acquires the target image corresponding to the three-dimensional game scene in the current target game scene.
[0039] In one possible implementation, the step of rendering the target image to obtain the target texture includes:
[0040] When the virtual object's gaze moves, the target image is rendered to obtain the target texture;
[0041] The target image is rendered using the camera view rendering frame rate of the virtual camera in the transformation region to obtain the target texture. The camera view rendering frame rate is determined based on the distance between the virtual object and the starting transformation region. The camera view rendering frame rate is less than or equal to the rendering frame rate of other regions in the graphical user interface except for the target texture.
[0042] An intersection test is performed between the geometric model of the initial transformation region shape and the camera frustum of the virtual object's viewpoint to obtain the test result. If the test result indicates that the geometric model is not within the camera frustum, the rendering process of the target image is canceled.
[0043] The target image is rendered based on the camera resolution of the virtual camera in the transformation region to obtain the target texture. The camera resolution is determined according to the distance between the virtual object and the starting transformation region. The camera resolution is less than or equal to the resolution of other areas in the graphical user interface other than the target texture.
[0044] In one possible implementation, the step of rendering the target image to obtain the target texture includes:
[0045] Based on a preset maximum number of recursive calls, the following steps are performed iteratively using a recursive function until it is determined that there are no other starting transformation regions besides the current starting transformation region in the virtual camera viewpoint bound to the current target transformation region. Based on the determined starting transformation regions, the target image is rendered to obtain the target texture:
[0046] The intersection test is performed between the geometric model of the initial transformation region shape and the camera frustum of the virtual camera viewpoint of the current transformation region to obtain the test result;
[0047] Based on the test results, determine whether there are other initial transformation regions besides the current initial transformation region in the virtual camera's view of the current transformation region;
[0048] If so, the other starting transformation region will be used as the current starting transformation region in the next recursive judgment process.
[0049] In one possible implementation, the step of controlling the display of the virtual object in the target game scene corresponding to the target transformation area based on the second movement information includes:
[0050] The object model of the virtual object transformed in the scene transformation area is copied, and the appearance and actions of the two copied object models are consistent.
[0051] Determine a first part of the object model in one of the two object models that is located on one side of the starting transformation region, and determine a second part of the object model in the other object model that is located on one side of the target transformation region;
[0052] In the graphical user interface, the first part of the object model is displayed in the starting transformation area based on the first movement information, and the second part of the object model is displayed in the target transformation area based on the second movement information.
[0053] Secondly, a game virtual scene transformation device is provided, wherein the three-dimensional game scene includes a scene transformation region and virtual objects, and the scene transformation region includes a starting transformation region and a target transformation region; the device includes:
[0054] The first determining module is configured to, in response to a transformation operation triggered by controlling the virtual object in the initial transformation area, determine the first movement information of the virtual object in the current game scene, wherein the current game scene is the game scene corresponding to the initial transformation area, and the movement information includes at least one of the following: movement direction, movement speed, and current orientation;
[0055] The second determining module is used to determine the initial transmission state of the first movement information relative to the initial transformation region, based on the initial transformation region.
[0056] The conversion module is used to replace the reference of the initial output state with the target transformation region to obtain the target output state, and convert the target output state into the second movement information in the target game scene corresponding to the target transformation region;
[0057] The control module is used to control the display of the virtual object in the target game scene corresponding to the target transformation area based on the second movement information.
[0058] Thirdly, embodiments of this application provide an electronic terminal, including a memory and a processor. The memory stores a computer program that can run on the processor, and the processor executes the computer program to implement the method described in the first aspect above.
[0059] Fourthly, embodiments of this application also provide a computer-readable storage medium storing machine-executable instructions, which, when invoked and executed by a processor, cause the processor to perform the method described in the first aspect above.
[0060] The embodiments of this application bring the following beneficial effects:
[0061] This application provides a method, apparatus, and electronic terminal for transforming a game virtual scene. When a transformation operation is triggered in the initial transformation area, the method determines the first movement information of a virtual object in the current game scene. Then, using the initial transformation area as a reference, it determines the initial transmission state of the first movement information relative to the initial transformation area. Next, it replaces the reference of the initial transmission state with the target transformation area to obtain the target transmission state. The target transmission state is then converted into second movement information in the target game scene corresponding to the target transformation area. Finally, based on the second movement information, it controls the display of the virtual object in the target game scene. In this solution, by determining the transmission state of the first movement information of the virtual object relative to the initial transformation area when it is input, it can maintain... When a virtual object triggers a transformation operation in the initial transformation area, its original movement state relative to the initial transformation area remains unchanged. This ensures that the output state of the determined virtual object relative to the initial transformation area after passing through it maintains its original movement state. The reference of this output state is then replaced with the target transformation area, resulting in the output state relative to the target transformation area. The converted second movement information also maintains its original movement state, thus enabling the displayed virtual object to truly pass through the scene transformation area, rather than simply teleporting the virtual object. This enhances the realism of passing through the scene transformation area and improves the gaming experience, alleviating the technical problem of low realism in the player's experience of virtual scene transformations in the game.
[0062] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description
[0063] To more clearly illustrate the technical solutions in the specific embodiments of this application or the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0064] Figure 1 This is a schematic diagram illustrating an application scenario provided in the embodiments of this application;
[0065] Figure 2 This is a schematic diagram of the structure of an electronic terminal in an application scenario provided in the embodiments of this application;
[0066] Figure 3 A flowchart illustrating a game virtual scene transformation method provided in an embodiment of this application;
[0067] Figure 4This application provides an example of the input and output states of a virtual object when it passes through a scene transformation area in the game virtual scene transformation method.
[0068] Figure 5 A graphical user interface diagram illustrating a scene transformation area display effect provided in an embodiment of this application;
[0069] Figure 6 A schematic diagram illustrating the line-of-sight direction of the virtual object and the virtual camera in the transformation area provided in the embodiments of this application;
[0070] Figure 7 This is a schematic diagram of the structure of a game virtual scene transformation device provided in an embodiment of this application. Detailed Implementation
[0071] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0072] The terms "comprising" and "having," and any variations thereof, used in the embodiments of this application, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not limited to the steps or units listed, but may optionally include other steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or devices.
[0073] Currently, virtual scene transformation is a mechanism in games, such as portals, where virtual objects can instantly reach a target area when they pass through a portal. Some games use the portal mechanism as a core gameplay element, requiring players to solve various spatial puzzles using portals.
[0074] In existing games, when virtual objects pass through portals, the effect is that the virtual object is instantly moved from the current game scene to the target game scene, resulting in a low level of realism for players using portals in the game.
[0075] Based on this, embodiments of this application provide a method, apparatus, and electronic terminal for transforming virtual game scenes. This method can alleviate the technical problem of low realism in the player's experience of virtual scene transformation in the game.
[0076] The game virtual scene transformation method in this embodiment can be applied to an electronic terminal. The electronic terminal includes a display, an input device, and a processor. The display is used to present a graphical user interface. The input device can be a keyboard, mouse, touchscreen, or other device used to receive operations on the graphical user interface.
[0077] In practical applications, electronic terminals can be computer devices, or touch-screen terminals such as mobile phones and tablets. As an example, this electronic terminal is a touch-screen terminal, and its display and input device can be integrated into a touchscreen, which is used to present a graphical user interface and receive operations for the graphical user interface.
[0078] In some embodiments, when operating a graphical user interface via an electronic terminal, the graphical user interface can be used to operate content local to the electronic terminal or content on a peer server.
[0079] For example, such as Figure 1 As shown, Figure 1 This is a schematic diagram of an application scenario provided by an embodiment of this application. The application scenario may include an electronic terminal (e.g., mobile phone 102) and a server 101. The electronic terminal can communicate with the server 101 via a wired or wireless network. The electronic terminal is used to run a virtual desktop, through which it can interact with the server 101 to manipulate the content on the server 101.
[0080] This embodiment uses mobile phone 102 as an example to illustrate the electronic terminal. Mobile phone 102 includes components such as radio frequency (RF) circuit 110, memory 120, touch screen 130, and processor 140. Those skilled in the art will understand that... Figure 2 The mobile phone structure shown does not constitute a limitation on the mobile phone and may include more or fewer components than shown, or combine or separate certain components, or have different component arrangements. Those skilled in the art will understand that the touchscreen 130 is a user interface (UI), and the mobile phone 102 may include a user interface with fewer components than shown.
[0081] The RF circuit 110 can also communicate wirelessly with networks and other devices. The wireless communication can use any communication standard or protocol, including but not limited to Global System for Mobile Communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), email, and Short Messaging Service (SMS).
[0082] The memory 120 can be used to store software programs and modules. The processor 140 executes various functional applications and data processing of the mobile phone 102 by running the software programs and modules stored in the memory 120. The memory 120 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, applications required for at least one function, etc.; the data storage area may store data created based on the use of the mobile phone 102, etc. In addition, the memory 120 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device.
[0083] The touchscreen 130 can be used to display a graphical user interface (GUI) and receive user operations on the GUI. Specifically, the touchscreen 130 may include a display panel and a touch panel. The display panel can be configured as a Liquid Crystal Display (LCD), Organic Light-Emitting Diode (OLED), or similar devices. The touch panel can collect user touch or non-touch operations on or near it (e.g., operations performed by the user using a finger, stylus, or any suitable object or accessory on or near the touch panel) and generate pre-set operation commands. Furthermore, the touch panel may include a touch detection device and a touch controller. The touch detection device detects the user's touch position and posture, and detects the signals generated by the touch operation, transmitting the signals to the touch controller. The touch controller receives touch information from the touch detection device, converts it into information that the processor can process, and sends it to the processor 140. It can also receive and execute commands from the processor 140. Moreover, the touch panel can be implemented using various types of technologies, such as resistive, capacitive, infrared, and surface acoustic wave, or any future-developed technology. Furthermore, the touch panel can cover the display panel. Users can operate on or near the touch panel covered by the graphical user interface displayed on the display panel. After detecting the operation on or near the touch panel, the touch panel transmits it to the processor 140 to determine the user input. Subsequently, the processor 140 provides corresponding visual output on the display panel in response to the user input. Alternatively, the touch panel and the display panel can be implemented as two separate components or integrated together.
[0084] The processor 140 is the control center of the mobile phone 102. It connects to various parts of the mobile phone through various interfaces and lines. By running or executing software programs and / or modules stored in the memory 120, and calling data stored in the memory 120, it performs various functions of the mobile phone 102 and processes data, thereby monitoring the mobile phone as a whole.
[0085] The embodiments of the present invention will be further described below with reference to the accompanying drawings.
[0086] Figure 3 This is a flowchart illustrating a game virtual scene transformation method provided in an embodiment of this application.
[0087] The game's 3D game scene includes scene transformation areas and virtual objects. The scene transformation areas include a starting transformation area and a target transformation area. For example... Figure 1 As shown, the method includes:
[0088] Step S310: In response to the transformation operation triggered by the virtual object in the initial transformation area, determine the first movement information of the virtual object in the current game scene.
[0089] The current game scene refers to the game scene corresponding to the initial transformation area. Furthermore, the movement information may include at least one of the following: movement direction, movement speed, and current orientation. The first movement information in this step refers to the movement state relative to the current game scene corresponding to the initial transformation area, such as the virtual object's movement direction, movement speed, and current orientation in the current game scene. Of course, the movement information in this embodiment may also include movement states with other attributes such as relative position.
[0090] In this embodiment of the application, the virtual object can be any object in the game, such as virtual characters, virtual animals, virtual weapons, virtual tools, virtual buildings, etc.
[0091] In practical applications, scene transformation regions are paired, meaning one transformation region corresponds to another, and the scene can be transformed between the two transformation regions. For example, in a game scene, two transformation regions are placed, with their orientations differing by 180 degrees. As a virtual object passes through one of these transformation regions, the region it passes through is called the starting transformation region, and the region it reaches is called the target transformation region. The starting and target transformation regions can be placed anywhere in the game scene. When a virtual object is located in the starting transformation region, the transformation operation is triggered.
[0092] Step S320: Based on the starting transformation region, determine the initial transmission state of the first movement information relative to the starting transformation region.
[0093] Here, the reference can be understood as a fixed coordinate system based on the initial transformation region. For example, the initial transformation region is a three-dimensional region composed of regular quadrilaterals, similar to a door frame. A vertex of one of the quadrilaterals in the initial transformation region is taken as the origin of the coordinate system, and the length, width, and height of the boundary of the region extending from the origin are the x-axis, y-axis, and z-axis of the coordinate system, respectively.
[0094] In this step, the movement state of the first movement information relative to the starting transformation region remains unchanged. The initial output state relative to the starting transformation region refers to the state relative to the starting transformation region when the virtual object has already passed through the starting transformation region.
[0095] For example, during the process of a virtual object passing through the initial transformation region, the state of the virtual object relative to the initial transformation region, such as its direction of movement, speed of movement, and current orientation, remains unchanged. This ensures that the virtual object's direction of movement, speed of movement, and current orientation relative to the initial transformation region before and after passing through it are unchanged, similar to the effect of passing through a door frame, where the movement state before and after passing through the door frame remains unchanged.
[0096] For example, such as Figure 4 As shown, the virtual object enters the initial transformation region A with a movement direction of vector v1 relative to the initial transformation region A. When it exits the initial transformation region A, the movement vector v2 relative to the initial transformation region A still maintains the direction of vector v1 relative to the initial transformation region A.
[0097] Step S330: Replace the reference of the initial output state with the target transformation region to obtain the target output state, and convert the target output state into the second movement information in the target game scene corresponding to the target transformation region.
[0098] It should be noted that the second-world state refers to the movement state of the target game scene relative to the target transformation area, such as the movement direction, movement speed, and current orientation of the virtual object in the target game scene.
[0099] In this step, the relative states between the initial output state relative to the starting transformation region and the target output state relative to the target transformation region are the same; only the references for their relative states are different. In step S320, the reference for the initial output state relative to the starting transformation region is the starting transformation region. In this step, this reference is replaced with the target transformation region to obtain the target output state relative to the target transformation region, with the target transformation region as the reference.
[0100] For example, such as Figure 4 As shown, a virtual object moves out of the initial transformation region A with a direction of movement of vector v2 relative to the initial transformation region A. When the virtual object moves out of the target transformation region B, its movement vector v2' relative to the target transformation region B is in the same direction as vector v2 relative to the initial transformation region. This can also be understood as follows: when a vector passes through the initial transformation region and exits the target transformation region, its orientation relative to the target transformation region remains the same as its orientation relative to the initial transformation region.
[0101] Step S340: Based on the second movement information, control the virtual object to display the target game scene corresponding to the target transformation area.
[0102] Virtual objects can appear in the target game scene corresponding to the target transformation area as the second movement information, so as to achieve the effect of virtual objects entering from the starting transformation area, passing through the scene transformation area and exiting the target transformation area.
[0103] By determining the output state of the first movement information of the virtual object when it is passed in relative to the starting transformation area, the original movement state of the virtual object relative to the starting transformation area can be kept unchanged when the transformation operation is triggered in the starting transformation area. Thus, the output state of the virtual object relative to the starting transformation area after passing through the starting transformation area can maintain the original movement state. Then, the reference of the output state is replaced with the target transformation area, and the output state relative to the target transformation area is obtained. The second movement information converted from it can still maintain the original movement state. Thus, the displayed virtual object can achieve the effect of truly passing through the scene transformation area, rather than directly teleporting the virtual object. This enhances the realism of passing through the scene transformation area and the game experience.
[0104] The steps described above will be explained in detail below.
[0105] In some embodiments, the direction of movement of the virtual object as it passes through a scene transition area can be kept constant to make the player feel more realistically that they have passed through a series of consecutive scene transition areas. As an example, the movement information includes the movement direction; the first movement direction in the first movement information, relative to the incident direction of the starting transition area, and the second movement direction in the second movement information, relative to the exit direction of the target transition area, are on the same ray.
[0106] For example, such as Figure 4 As shown, the virtual object enters the initial transformation region A with an incident direction of movement vector v1 relative to the initial transformation region A. The incident direction of movement vector v1 relative to the initial transformation region A is the same as the incident direction of movement vector v1' relative to the target transformation region B. The movement vector v2' of the virtual object when it exits the target transformation region B is on the same ray as the movement vector v1' of the virtual object when it enters the target transformation region B.
[0107] By aligning the incident movement direction of the virtual object relative to the starting transformation area and the outgoing movement direction relative to the target transformation area along the same ray when the virtual object passes through the scene transformation area, the movement direction of the virtual object remains unchanged when passing through the scene transformation area, making the player feel as if they have truly passed through a series of interconnected transformation areas.
[0108] Based on this, the movement direction of the virtual object after scene transformation can be calculated through mirroring, ensuring that the movement direction of the virtual object remains unchanged when passing through the scene transformation region. As an example, step S320 above may include any one of the following steps:
[0109] Step a) Mirror the first moving direction relative to the first longitudinal plane to obtain a first sub-moving direction relative to the starting transformation region, wherein the first longitudinal plane is perpendicular to the plane of the starting transformation region; mirror the first sub-moving direction relative to the second longitudinal plane to obtain a second sub-moving direction relative to the starting transformation region, wherein the second longitudinal plane is parallel to the plane of the starting transformation region; determine the second sub-moving direction as the starting outgoing moving direction of the first moving information relative to the starting transformation region.
[0110] Step b) Mirror the first moving direction relative to the second longitudinal plane to obtain a third sub-moving direction relative to the starting transformation region; mirror the third sub-moving direction relative to the first longitudinal plane to obtain a fourth sub-moving direction relative to the starting transformation region; determine the fourth sub-moving direction as the starting outgoing moving direction of the first moving information relative to the starting transformation region.
[0111] For step a) above, for example, assuming that the movement vector of the virtual object relative to the starting transformation region A when it enters the starting transformation region A is v1, the vector v1 is mirrored towards the vertical plane perpendicular to the starting transformation region A, and then mirrored towards the plane of the transformation region A to obtain the movement vector v2.
[0112] For step b) above, for example, assuming that the movement vector of the virtual object relative to the starting transformation region A when it enters the starting transformation region A is v1, the vector v1 is mirrored towards the plane of the transformation region A, and then mirrored towards the vertical plane perpendicular to the starting transformation region A to obtain the movement vector v2.
[0113] By performing two mirroring operations on the movement vector when entering the initial transformation region to calculate the movement direction of the virtual object after the scene transformation, not only is the movement direction of the virtual object kept unchanged when passing through the scene transformation region, but the calculation efficiency of the movement direction of the virtual object after the scene transformation is also improved.
[0114] In some embodiments, the movement speed of the virtual object can be kept constant when traversing a scene transition area, so that the player can more realistically feel that they are traversing a transition area that is connected one after the other. As an example, the movement information also includes movement speed; the second movement speed in the second movement information is the result of multiplying the magnitude of the first movement speed in the first movement information by the second movement direction.
[0115] The virtual object has a moving speed when it passes through the initial transformation region. When the virtual object comes out of the target transformation region, the speed of the virtual object remains unchanged. The calculation method of the unit vector of the speed direction is the same as the calculation method of the unit vector of the moving direction.
[0116] By processing the magnitude and direction of the speed separately, and then multiplying the original magnitude of the speed by the calculated unit vector of the movement direction after the scene transformation, the overall movement speed after the scene transformation is obtained. This ensures that the relative speed of the speed after the scene transformation relative to the target transformation area remains unchanged from the relative speed of the speed before the scene transformation relative to the starting transformation area, thereby improving the realism of the player's experience of passing through the transformation area.
[0117] In some embodiments, the current orientation of the virtual object can be kept constant as it passes through a scene transformation area pair, so that the player can more realistically feel that they have passed through a series of consecutive scene transformation areas. As an example, the movement information includes the current orientation; the first current orientation in the first movement information is incident on the direction of incidence relative to the starting transformation area, and the second current orientation in the second movement information is outgoing on the same ray relative to the direction of exit from the target transformation area.
[0118] Here, "current orientation" refers to the orientation of the virtual object's model body itself, that is, the rotation angle of the virtual object's model in the game scene. For example... Figure 4 As shown, when a virtual object enters the initial transformation region A, its current orientation relative to the initial transformation region A is incident vector v1. The incident direction of orientation vector v1 relative to the initial transformation region A is the same as the incident direction of orientation vector v1' relative to the target transformation region B. When the virtual object exits the target transformation region B, its orientation vector v2' relative to the target transformation region B is on the same ray as the orientation vector v1' relative to the target transformation region B when the virtual object entered the target transformation region B.
[0119] By aligning the incident direction of the virtual object relative to the starting transformation region and the exit direction relative to the target transformation region on the same ray when the virtual object passes through the scene transformation region pair, the orientation of the virtual object itself remains unchanged when passing through the scene transformation region pair, making the player feel as if they have truly passed through a series of interconnected scene transformation regions.
[0120] Based on this, the orientation of the virtual object after scene transformation can be calculated through mirroring, ensuring that the virtual object's orientation remains unchanged when passing through the scene transformation area. As an example, step S320 above may include any one of the following steps:
[0121] Step c) Mirror the first current orientation relative to the first longitudinal plane to obtain a first sub-current orientation relative to the starting transformation region, wherein the first longitudinal plane is perpendicular to the plane of the starting transformation region; mirror the first sub-current orientation relative to the second longitudinal plane to obtain a second sub-current orientation relative to the starting transformation region, wherein the second longitudinal plane is parallel to the plane of the starting transformation region; determine the second sub-current orientation as the starting outgoing orientation of the first movement information relative to the starting transformation region.
[0122] Step d) Mirror the first current orientation relative to the second longitudinal plane to obtain the third sub-current orientation relative to the starting transformation region; mirror the third sub-current orientation relative to the first longitudinal plane to obtain the fourth sub-current orientation relative to the starting transformation region; determine the fourth sub-current orientation as the starting outgoing orientation of the first movement information relative to the starting transformation region.
[0123] For step a) above, for example, assuming that the orientation vector of the virtual object relative to the starting transformation region A when it enters the starting transformation region A is v1, the vector v1 is mirrored towards the vertical plane perpendicular to the starting transformation region A, and then mirrored towards the plane of the starting transformation region A to obtain the orientation vector v2.
[0124] For step b) above, for example, assuming that the orientation vector of the virtual object relative to the starting transformation region A when it enters the starting transformation region A is v1, the vector v1 is mirrored towards the plane of the starting transformation region A, and then mirrored towards the vertical plane perpendicular to the starting transformation region A to obtain the orientation vector v2.
[0125] By performing two mirroring operations on the vector of the current orientation when entering the initial transformation region, the current orientation of the virtual object after the scene transformation is calculated. This not only keeps the orientation of the virtual object unchanged when passing through the scene transformation region, but also improves the calculation efficiency of the orientation after the scene transformation.
[0126] In some embodiments, the relative position of the virtual object before and after passing through a scene transformation area can be kept unchanged to make the player feel more realistically that they have passed through a series of consecutive scene transformation areas. As an example, the movement information also includes relative position; the first relative position of the virtual object relative to the starting transformation area in the first movement information is the same as the second relative position of the virtual object relative to the target transformation area in the second movement information.
[0127] In this embodiment, the relative position of the virtual object when it enters the starting transformation region is the same as the relative position of the virtual object when it exits the target transformation region. For example, if the virtual object enters the starting transformation region from the upper left position, it will also exit the target transformation region from the upper left position.
[0128] By ensuring that the virtual object's entry position relative to the starting transformation area is the same as its exit position relative to the target transformation area when passing through the scene transformation area, the relative position of the virtual object with respect to the scene transformation area remains unchanged, making the player feel as if they have truly passed through a series of interconnected scene transformation areas.
[0129] Based on this, the position of the virtual object relative to the target transformation area after the scene transformation can be calculated through mirroring, so that the relative position of the virtual object remains unchanged when passing through the scene transformation area.
[0130] As an example, step S320 above may include the following steps:
[0131] Step e) Based on the first relative position, perform mirroring relative to the plane of the initial transformation region to obtain the third relative position relative to the initial transformation region;
[0132] Step f) determines the third relative position as the initial transmission relative position of the first movement information relative to the initial transformation region.
[0133] For the calculation of the position of the virtual object after the scene transformation, assuming that the position of the player relative to the starting transformation area when entering the starting transformation area is p1, the plane of p1 relative to the starting transformation area is mirrored to obtain p2. Finally, the position of the virtual object relative to the target transformation area when it exits the target transformation area is the same as the relative position of p2 relative to the starting transformation area.
[0134] By mirroring the relative position when entering the initial transformation region to calculate the relative position of the virtual object after the scene transformation, not only can the relative position of the virtual object remain unchanged before and after passing through the scene transformation region, but the calculation efficiency of the position after the scene transformation can also be improved.
[0135] In some embodiments, the first movement information relative to the current game scene can be first converted into an initial incoming state relative to the initial transformation region, and then the initial outgoing state relative to the initial transformation region can be determined. As an example, before step S320, the method may further include the following steps:
[0136] Step g) converts the first movement information into the initial input state of the virtual object relative to the initial transformation area in the current game scene.
[0137] It should be noted that the first movement information is based on the current game scene corresponding to the starting transformation area, and is movement information relative to the current game scene. In this embodiment, the first movement information relative to the current game scene is first converted into an initial input state relative to the starting transformation area, so that the initial output state relative to the starting transformation area can be determined later by keeping the initial input state unchanged.
[0138] Based on step g) above, the target output state relative to the target transformation area can be converted into second movement information relative to the target game scene, so that virtual objects can be displayed in the target game scene based on the second movement information. As an example, the process of converting the target output state into second movement information in the target game scene corresponding to the target transformation area in step S330 above may include the following steps:
[0139] Step h) converts the target output state relative to the target transformation area into the second movement information of the virtual object relative to the target game scene when it is in the target transformation area.
[0140] It should be noted that the second movement information is based on the target game scene that the target transformation area faces, and is movement information relative to the target game scene. In this embodiment, the target output state relative to the target transformation area can be converted into the second movement information relative to the target game scene using the world transformation matrix of the target transformation area, so that virtual objects can be displayed based on the second movement information.
[0141] In some embodiments, players can observe a scene image of the target game scene corresponding to the target transformation region through the initial transformation region. As an example, the 3D game scene also includes a transformation region virtual camera, which is bound to the target transformation region and faces the target game scene; the method may further include the following steps:
[0142] Step i) When the virtual object is in the current game scene, the target image corresponding to the 3D game scene in the target game scene is acquired by the virtual camera of the transformed area;
[0143] Step j) Render the target image to obtain the target texture;
[0144] Step k) Apply the target texture to the area formed by the border of the starting transformation region and display the starting transformation region after applying the texture in the graphical user interface.
[0145] In this embodiment, a virtual camera can be bound to the target transformation region. Then, through the perspective of the virtual camera, the scene of the target game scene captured by the virtual camera is rendered onto a texture. This texture is then applied to the initial transformation region in front of the virtual object, such as... Figure 5 As shown, players can see the target game scene C corresponding to the target transformation area through the initial transformation area A, thus enabling players to see the corresponding scene opposite the scene transformation area.
[0146] By using an additional transformation area virtual camera and rendering textures, the rendering process of the target game scene opposite the scene transformation area is realized. Even if the target game scene is not spatially connected to the current game scene, players can still see the target game scene through the initial transformation area, which improves the realism of the scene transformation area and the game experience.
[0147] Based on steps i), j), and k), the target game scene displayed in the initial transformation area can change as the virtual object moves within the current game scene and as the viewpoint moves, making the display effect more dynamic and realistic. As an example, step i) may include the following steps:
[0148] Step 1) Obtain the current starting position of the current virtual object in the current game scene, and determine the current target position in the target game scene relative to the target transformation area based on the current starting position; determine the current target position as the current position of the virtual camera in the transformation area;
[0149] Step m) Obtain the first viewing direction of the current virtual object facing the starting transformation area in the current game scene. Based on the first viewing direction, determine the second viewing direction of the virtual object facing the target transformation area. The incident direction of the first viewing direction relative to the starting transformation area and the incident direction of the second viewing direction relative to the target transformation area are on the same ray. Determine the exit direction of the second viewing direction as the current orientation direction of the virtual camera in the transformation area.
[0150] Step n): Using the virtual camera in the transformation area that is currently facing the current direction and located at the current position, acquire the target image corresponding to the 3D game scene in the current target game scene.
[0151] For example, such as Figure 6 As shown, the virtual object's line of sight through the initial transformation area is arrow Va, and the image acquisition direction of the virtual camera in the transformation area towards the target game scene is arrow Vb. Va's direction relative to the initial transformation area and Vb's direction relative to the target transformation area are the same, so that the virtual camera in the transformation area captures the target game scene with the same line of sight as the virtual object.
[0152] For the specific algorithm of the orientation of the virtual camera in the transformation area, the specific acquisition orientation of the virtual camera in the transformation area can be determined based on the viewing direction of the virtual object using the mirroring processing method of the current orientation in steps c) and d) above. For the specific algorithm of the position of the virtual camera in the transformation area, the specific acquisition position of the virtual camera in the transformation area can be determined based on the relative position of the virtual object with respect to the starting transformation area using the mirroring processing method of the current orientation in steps e) and f) above.
[0153] By determining the shooting orientation of the virtual camera in the transformation area and its position relative to the target transformation area based on the virtual object's line of sight in the current game scene and its position relative to the starting transformation area, the perspective of the virtual object is simulated. This achieves the effect that the target game scene displayed in the starting transformation area changes as the virtual object moves in the current game scene and its line of sight, resulting in a more realistic dynamic display effect.
[0154] Based on steps i), j), and k), the rendering frame rate, rendering resolution, and whether the target game scene image displayed within the initial transformation region can be optimized based on the specific circumstances of the virtual object in the current game scene. As an example, step j) may include the following steps:
[0155] Step o): When the virtual object's view moves, the target image is rendered to obtain the target texture;
[0156] Step p) Render the target image using the camera view rendering frame rate of the virtual camera in the transformed region to obtain the target texture. The camera view rendering frame rate is determined based on the distance between the virtual object and the starting transformed region. The camera view rendering frame rate is less than or equal to the rendering frame rate of other regions in the graphical user interface except for the target texture.
[0157] Step q) Perform an intersection test between the geometric model of the initial transformation region shape and the camera frustum of the virtual object's viewpoint to obtain the test result. If the test result is that the geometric model is not within the camera frustum, then cancel the rendering process of the target image.
[0158] Step r) Render the target image based on the camera resolution of the virtual camera in the transformation region to obtain the target texture. The camera resolution is determined based on the distance between the virtual object and the starting transformation region. The camera resolution is less than or equal to the resolution of other areas in the graphical user interface except for the target texture.
[0159] For step p) above, for example, the rendering frame rate (refresh rate) of the virtual camera in the transformation area can be adjusted according to the distance of the virtual object from the starting transformation area, and can use a lower frame rate than the virtual object's main viewpoint. For example, if the main viewpoint needs to render 60 frames per second, if the virtual object is close to the starting transformation area, the rendering frame rate of the virtual camera in the transformation area can be 50 frames per second; if the virtual object is far from the starting transformation area, the virtual camera in the transformation area can use a lower rendering frame rate, such as 10 frames per second; when the virtual object gets closer to the starting transformation area, the rendering frame rate of the virtual camera in the transformation area is increased; or the rendering of the virtual camera in the transformation area can only be updated when the virtual object's viewpoint moves, otherwise the previous rendering result is used. In this way, it is not easily noticed by the player and can save the performance overhead of data processing.
[0160] For step q) above, for example, if the virtual object cannot see the initial transformation region, the image captured by the virtual camera in the transformation region can be skipped from rendering. For instance, a rectangle can be used to represent the initial transformation region, and an intersection test can be performed between the rectangle and the camera's view frustum of the virtual object. If the rectangle is found to be outside the view frustum, the camera rendering of the virtual camera in the transformation region can be skipped. In this way, if there are many invisible initial transformation regions in the scene, a significant amount of CPU and GPU processing time can be saved.
[0161] For step r) above, for example, the resolution of the rendered texture can be appropriately reduced to optimize rendering efficiency. Since the initial transformation region does not completely occupy the entire screen, a size lower than the screen resolution can be used to render the image within the bounding box of the initial transformation region, i.e., the image captured by the virtual camera in the transformation region. For example, different sizes of rendering textures can be pre-allocated. When the virtual object gradually approaches the initial transformation region, the texture is switched to a larger resolution; when the virtual object moves away from the initial transformation region, the texture is switched to a smaller size.
[0162] By optimizing aspects such as rendering frame rate, rendering resolution, and culling for the virtual camera in the transformation region, the performance overhead of image processing can be reduced, especially when there are many initial transformation regions in a 3D scene. Furthermore, it avoids the situation where the scene within the bounding box of the initial transformation region is rendered twice (once from the normal viewpoint and once from the viewpoint of the virtual camera in the transformation region) when a virtual object is looking at it, thus alleviating the significant performance pressure.
[0163] Based on steps i), j), and k), the rendering of the initial transformation region can be achieved through recursive rendering. As an example, step j) may include the following steps:
[0164] Step s) involves iteratively performing the following steps using a recursive function based on a preset maximum recursion count, until it is determined that there are no other initial transformation regions besides the current initial transformation region in the virtual camera's viewpoint bound to the current target transformation region. Based on the determined initial transformation regions, the target image is rendered to obtain the target texture.
[0165] Step t) involves performing an intersection test between the geometric model of the initial transformation region shape and the camera frustum of the current transformation region virtual camera viewpoint to obtain the test results;
[0166] Step u) Determine whether there are other initial transformation regions besides the current initial transformation region in the virtual camera's view of the current transformation region based on the test results;
[0167] Step v), if so, then other starting transformation regions are used as the current starting transformation regions in the next recursive judgment process.
[0168] In practical applications, when a virtual object sees another initial transformation region through one initial transformation region, the initial transformation regions within that initial transformation region still need to undergo recursive rendering. This situation is similar to looking at one mirror with another, where you can see an infinitely recursive extension in the mirror.
[0169] In this embodiment, during virtual camera rendering of the transformation region, it is determined whether there are other initial transformation regions within its viewpoint. This determination can be made using a view frustum combined with a rectangle intersection test. If other initial transformation regions are found within the view frustum, then the other initial transformation regions within that initial transformation region are rendered. The entire determination process must be recursive; that is, initial transformation regions within initial transformation regions must also undergo corresponding determinations. This achieves a more effective recursive rendering effect for cases where other initial transformation regions are nested within an initial transformation region.
[0170] To prevent infinite recursion (such as when two initial transformation regions face each other), a preset maximum number of recursion iterations can be used to control the maximum number of recursive iterations. When the preset maximum number of recursion iterations is reached, the calculation stops, and it is determined whether there are other initial transformation regions within the initial transformation region.
[0171] It's important to note that the calculation method using the recursive function remains the same each time; only the perspective during the calculation changes each time, moving from one initial transformation region to another within it. The perspective angle of the initial transformation region is constantly changing. It's crucial to understand that when rendering the initial transformation region within the initial transformation region, the viewpoint position of the initial transformation region or the viewpoint position of the virtual camera within the transformation region is used, not the virtual object's viewpoint. This is because the viewpoint from the initial transformation region's perspective differs from the virtual object's viewpoint.
[0172] By rendering recursive results through recursive processing, it is possible to determine more efficiently, accurately, and effectively whether a virtual object can see other initial transformation regions from the region bounding box of the initial transformation region.
[0173] In some embodiments, seamless transformation can also be achieved as the virtual object traverses the scene transformation area. As an example, step S340 above may include the following steps:
[0174] Step w) involves copying the object model of the virtual object in the scene transformation area, ensuring that the appearance and actions of the two copied object models are consistent.
[0175] Step x) Determine the first part of the object model in one of the two object models that is located on one side of the starting transformation region, and determine the second part of the object model in the other object model that is located on one side of the target transformation region.
[0176] Step y): In the graphical user interface, a first part of the object model is displayed in the starting transformation area based on the first movement information, and a second part of the object model is displayed in the target transformation area based on the second movement information.
[0177] For step w) above, the same action instruction can be used to control two identical object models at the same time, that is, the appearance and actions of the two object models are consistent.
[0178] For steps x) and y) above, one of the two object models displays only a portion of the object model (e.g., part of the body) on one side of the starting transformation region (e.g., the input position), while the other portion of the object model (e.g., another part of the body) is not displayed; the other object model displays only a portion of the object model (e.g., part of the body) on one side of the target transformation region (e.g., the output position), while the other portion of the object model (e.g., another part of the body) is not displayed.
[0179] By displaying one part of the virtual object's body only on the starting transformation area and the other part only on the target transformation area, the appearance and movement of the models corresponding to the two parts are consistent, thus achieving a seamless display effect. This avoids the low realism of instantaneous transformation effects and makes the virtual object's passage through the scene transformation area more realistic.
[0180] Figure 7 A schematic diagram of a game virtual scene transformation device is provided. The game's 3D scene includes a scene transformation area and virtual objects. The scene transformation area includes a starting transformation area and a target transformation area. Figure 7As shown, the game virtual scene transformation device 700 includes:
[0181] The first determining module 701 is used to determine the first movement information of the virtual object in the current game scene in response to the transformation operation triggered by the control virtual object in the initial transformation area. The current game scene is the game scene corresponding to the initial transformation area. The movement information includes at least one of the following: movement direction, movement speed and current orientation.
[0182] The second determining module 702 is used to determine the initial transmission state of the first movement information relative to the initial transformation area, based on the initial transformation area.
[0183] The first conversion module 703 is used to replace the reference of the initial output state with the target transformation area to obtain the target output state, and convert the target output state into the second movement information in the target game scene corresponding to the target transformation area.
[0184] The control module 704 is used to control the display of the virtual object in the target game scene corresponding to the target transformation area based on the second movement information.
[0185] In some embodiments, the movement information includes the direction of movement;
[0186] The first movement direction in the first movement information, relative to the incident direction of the starting transformation region, and the second movement direction in the second movement information, relative to the exit direction of the target transformation region, are on the same ray.
[0187] In some embodiments, the movement information also includes movement speed;
[0188] The second movement speed in the second movement information is the result of multiplying the magnitude of the first movement speed in the first movement information by the second movement direction.
[0189] In some embodiments, the movement information includes the current orientation;
[0190] The first current orientation in the first movement information, relative to the incident direction of the starting transformation region, and the second current orientation in the second movement information, relative to the exit direction of the target transformation region, are on the same ray.
[0191] In some embodiments, the movement information also includes relative location;
[0192] The first relative position of the virtual object relative to the starting transformation region in the first movement information is the same as the second relative position of the virtual object relative to the target transformation region in the second movement information.
[0193] In some embodiments, the second determining module 702 is specifically used for:
[0194] The first movement direction is mirrored relative to the first longitudinal plane to obtain a first sub-movement direction relative to the starting transformation region, where the first longitudinal plane is perpendicular to the plane of the starting transformation region; the first sub-movement direction is mirrored relative to the second longitudinal plane to obtain a second sub-movement direction relative to the starting transformation region, where the second longitudinal plane is parallel to the plane of the starting transformation region; the second sub-movement direction is determined as the initial outgoing movement direction of the first movement information relative to the starting transformation region; or,
[0195] The first moving direction is mirrored relative to the second longitudinal plane to obtain the third sub-moving direction relative to the starting transformation region; the third sub-moving direction is mirrored relative to the first longitudinal plane to obtain the fourth sub-moving direction relative to the starting transformation region; the fourth sub-moving direction is determined as the starting outgoing moving direction of the first moving information relative to the starting transformation region.
[0196] In some embodiments, the second determining module 702 is specifically used for:
[0197] The first current orientation is mirrored relative to the first longitudinal plane to obtain a first sub-current orientation relative to the starting transformation region, where the first longitudinal plane is perpendicular to the plane of the starting transformation region; the first sub-current orientation is mirrored relative to the second longitudinal plane to obtain a second sub-current orientation relative to the starting transformation region, where the second longitudinal plane is parallel to the plane of the starting transformation region; the second sub-current orientation is determined as the starting outgoing orientation of the first movement information relative to the starting transformation region; or,
[0198] The first current orientation is mirrored relative to the second longitudinal plane to obtain the third sub-current orientation relative to the starting transformation region; the third sub-current orientation is mirrored relative to the first longitudinal plane to obtain the fourth sub-current orientation relative to the starting transformation region; the fourth sub-current orientation is determined as the starting outgoing orientation of the first movement information relative to the starting transformation region.
[0199] In some embodiments, the second determining module 702 is specifically used for:
[0200] Based on the first relative position, a mirror image is performed relative to the plane of the initial transformation region to obtain the third relative position relative to the initial transformation region.
[0201] The third relative position is determined as the initial transmission relative position of the first movement information relative to the initial transformation region.
[0202] In some embodiments, the initial transformation region is located in the current game scene; the device further includes:
[0203] The second conversion module is used to convert the first movement information into the initial input state of the virtual object in the current game scene relative to the initial conversion area before determining the initial output state of the first movement information relative to the initial conversion area, based on the initial conversion area.
[0204] In some embodiments, the first conversion module 703 is specifically used for:
[0205] The target output state relative to the target transformation area is converted into the second movement information of the virtual object relative to the target game scene when it is in the target transformation area.
[0206] In some embodiments, the 3D game scene further includes a transform region virtual camera, which is bound to a target transform region and faces the target game scene; the device also includes:
[0207] The acquisition module is used to acquire target images corresponding to the 3D game scene in the target game scene by transforming the area virtual camera when the virtual object is in the current game scene;
[0208] The rendering module is used to render the target image to obtain the target texture;
[0209] The texture module is used to apply the target texture to the area bounded by the border of the starting transformation region, and displays the starting transformation region after applying the texture in the graphical user interface.
[0210] In some embodiments, the acquisition module is specifically used for:
[0211] Obtain the current starting position of the current virtual object in the current game scene, determine the current target position in the target game scene relative to the target transformation area based on the current starting position, and set the current target position as the current position of the virtual camera in the transformation area;
[0212] Obtain the first viewing direction of the current virtual object facing the starting transformation area in the current game scene; determine the second viewing direction of the virtual object facing the target transformation area based on the first viewing direction; the incident direction of the first viewing direction relative to the starting transformation area and the incident direction of the second viewing direction relative to the target transformation area are on the same ray; determine the exit direction of the second viewing direction as the current facing direction of the virtual camera in the transformation area;
[0213] The virtual camera in the transformed area, which is currently facing the current direction and located at the current position, acquires the target image corresponding to the 3D game scene in the current target game scene.
[0214] In some embodiments, the rendering module is specifically used for:
[0215] When the virtual object's view moves, the target image is rendered to obtain the target texture;
[0216] The target image is rendered using the camera view rendering frame rate of the virtual camera in the transformed region to obtain the target texture. The camera view rendering frame rate is determined based on the distance between the virtual object and the starting transformed region. The camera view rendering frame rate is less than or equal to the rendering frame rate of other regions in the graphical user interface except for the target texture.
[0217] An intersection test is performed between the geometric model of the initial transformation region and the camera frustum of the virtual object's view. If the test result indicates that the geometric model is not within the camera frustum, the rendering process of the target image is canceled.
[0218] The target image is rendered based on the camera resolution of the virtual camera in the transformed region to obtain the target texture. The camera resolution is determined according to the distance between the virtual object and the starting transformed region. The camera resolution is less than or equal to the resolution of other areas in the graphical user interface except for the target texture.
[0219] In some embodiments, the rendering module is specifically used for:
[0220] Based on a preset maximum number of recursive iterations, the following steps are performed iteratively using a recursive function until it is determined that there are no other initial transformation regions besides the current initial transformation region in the virtual camera's viewpoint bound to the current target transformation region. Based on the determined initial transformation regions, the target image is rendered to obtain the target texture:
[0221] The intersection test is performed between the geometric model of the initial transformation region shape and the camera frustum of the virtual camera viewpoint in the current transformation region to obtain the test results;
[0222] Based on the test results, determine whether there are other initial transformation regions besides the current initial transformation region in the virtual camera's view of the current transformation region;
[0223] If so, then other starting transformation regions will be used as the current starting transformation region in the next recursive judgment process.
[0224] In some embodiments, the control module 704 is specifically used for:
[0225] The object model of the virtual object transformed in the scene transformation area is copied, and the appearance and actions of the two copied object models are consistent.
[0226] Determine the first part of the object model in one of the two object models that is located on one side of the starting transformation region, and determine the second part of the object model in the other object model that is located on one side of the target transformation region;
[0227] In the graphical user interface, a first part of the object model is displayed in the initial transformation area based on the first movement information, and a second part of the object model is displayed in the target transformation area based on the second movement information.
[0228] The game virtual scene transformation device provided in this application embodiment has the same technical features as the game virtual scene transformation method provided in the above embodiment, so it can also solve the same technical problems and achieve the same technical effects.
[0229] Corresponding to the above-described game virtual scene transformation method, this application embodiment also provides a computer-readable storage medium storing machine-executable instructions. When the machine-executable instructions are called and run by a processor, the machine-executable instructions cause the processor to perform the steps of the above-described game virtual scene transformation method.
[0230] The game virtual scene transformation device provided in this application embodiment can be specific hardware on a device or software or firmware installed on the device. The implementation principle and technical effects of the device provided in this application embodiment are the same as those in the foregoing method embodiments. For the sake of brevity, any parts not mentioned in the device embodiment can be referred to the corresponding content in the foregoing method embodiments. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can all be referred to the corresponding processes in the above method embodiments, and will not be repeated here.
[0231] In the embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. Furthermore, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Additionally, the displayed or discussed mutual couplings, direct couplings, or communication connections may be through some communication interfaces; indirect couplings or communication connections between devices or units may be electrical, mechanical, or other forms.
[0232] For example, the flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram and / or flowchart, and combinations of blocks in block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.
[0233] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0234] In addition, the functional units in the embodiments provided in this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0235] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the game virtual scene transformation method described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0236] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. In addition, the terms "first", "second", "third", etc. are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0237] Finally, it should be noted that the above-described embodiments are merely specific implementations of this application, used to illustrate the technical solutions of this application, and not to limit them. The protection scope of this application is not limited thereto. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments, or make equivalent substitutions for some of the technical features, within the scope of the technology disclosed in this application; and these modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application. All should be covered within the protection scope of this application. Therefore, the protection scope of this application should be determined by the protection scope of the claims.
Claims
1. A method for changing a game virtual scene, characterized in that, The method comprises: controlling a transformation region to be placed in a game scene, wherein the transformation region comprises a starting transformation region and a target transformation region, the game scene contains a transformation region virtual camera, the transformation region virtual camera is bound to the target transformation region, and the transformation region virtual camera is directed to a direction of a target game scene; controlling a virtual object to move in the game scene in response to a movement control instruction; when the virtual object moves to the starting transformation region, determining first movement information of the virtual object in a current game scene, and determining a starting outgoing state of the first movement information relative to the starting transformation region, wherein the current game scene is a game scene corresponding to the starting transformation region, and the movement information comprises a movement direction, a movement speed, and a virtual object orientation; transforming the starting outgoing state according to the target transformation region to obtain a target outgoing state, and converting the target outgoing state into second movement information in a target game scene corresponding to the target transformation region, wherein a first movement direction in the first movement information is the same as a second movement direction in the second movement information relative to an incident direction of the starting transformation region; a first virtual object orientation in the first movement information is the same as a second virtual object orientation in the second movement information relative to the incident direction of the starting transformation region; a second movement speed in the second movement information is a result of multiplying a size of a first movement speed in the first movement information and the second movement direction; controlling the virtual object to be displayed in the target game scene corresponding to the target transformation region based on the second movement information.
2. The method of claim 1, wherein, During the process in which the virtual object passes through the starting transformation region, the movement direction, the movement speed, and the virtual object orientation of the virtual object relative to the starting transformation region are the same as those of the virtual object after passing through the starting transformation region.
3. The method of claim 1, wherein, The movement information further comprises a relative position; a first relative position of the virtual object relative to the starting transformation region in the first movement information is the same as a second relative position of the virtual object relative to the target transformation region in the second movement information.
4. The method of claim 1, wherein, The step of determining the starting outgoing state of the first movement information relative to the starting transformation region comprises: mirroring the first movement direction relative to a first longitudinal plane to obtain a first sub-movement direction relative to the starting transformation region, the first longitudinal plane being perpendicular to a plane of the starting transformation region; mirroring the first sub-movement direction relative to a second longitudinal plane to obtain a second sub-movement direction relative to the starting transformation region, the second longitudinal plane being parallel to the plane of the starting transformation region; and determining the second sub-movement direction as a starting outgoing movement direction of the first movement information relative to the starting transformation region; or mirroring the first movement direction relative to the second longitudinal plane to obtain a third sub-movement direction relative to the starting transformation region; mirroring the third sub-movement direction relative to the first longitudinal plane to obtain a fourth sub-movement direction relative to the starting transformation region; and determining the fourth sub-movement direction as a starting outgoing movement direction of the first movement information relative to the starting transformation region.
5. The method of claim 1, wherein, The step of determining the starting outgoing state of the first movement information relative to the starting transformation region comprises: mirroring the first virtual object orientation relative to the second longitudinal plane to obtain a third sub-virtual object orientation relative to the starting transformation region; mirroring the third sub-virtual object orientation relative to the first longitudinal plane to obtain a fourth sub-virtual object orientation relative to the starting transformation region; and determining the fourth sub-virtual object orientation as a starting outgoing orientation of the first movement information relative to the starting transformation region. mirroring the first virtual object orientation relative to the second longitudinal plane to obtain a third sub-virtual object orientation relative to the starting transformation region; mirroring the third sub-virtual object orientation relative to the first longitudinal plane to obtain a fourth sub-virtual object orientation relative to the starting transformation region; and determining the fourth sub-virtual object orientation as a starting outgoing orientation of the first movement information relative to the starting transformation region.
6. The method of claim 3, wherein, The step of determining the starting outgoing state of the first movement information relative to the starting transformation region comprises: mirroring the first relative position relative to the plane of the starting transformation region to obtain a third relative position relative to the starting transformation region; determining the third relative position as a starting outgoing relative position of the first movement information relative to the starting transformation region.
7. The method according to any one of claims 1 to 6, characterized in that, The method further comprises: converting the first movement information into a starting incoming state of the virtual object relative to the starting transformation region in the current game scene.
8. The method of claim 6, wherein, The step of converting the target outgoing state into the second movement information in the target game scene corresponding to the target transformation region comprises: converting the target outgoing state relative to the target transformation region into the second movement information of the virtual object relative to the target game scene when in the target transformation region.
9. The method of claim 1, wherein, The method further comprises: determining an orientation of the transformation region virtual camera and a position of the transformation region virtual camera relative to the target transformation region according to a line-of-sight direction of the virtual object in the current game scene and a position of the virtual object relative to the starting transformation region; capturing a target image corresponding to a three-dimensional game scene in the current target game scene through the orientation of the transformation region virtual camera and the position of the transformation region virtual camera relative to the target transformation region; rendering the target image to obtain a target texture; and rendering the target image to obtain a target texture; and displaying the start transformation region after the texture is pasted in the graphical user interface.
10. The method of claim 9, wherein, The step of determining the orientation and the position of the transformation region virtual camera relative to the target transformation region according to the line-of-sight direction of the virtual object in the current game scene and the position of the virtual object relative to the start transformation region comprises: obtaining a current start position of the virtual object in the current game scene, determining a current target position of the virtual object relative to the target transformation region in the target game scene based on the current start position, and determining the position of the transformation region virtual camera relative to the target transformation region based on the current target position; obtaining a first line-of-sight direction of the virtual object facing the start transformation region in the current game scene, determining a second line-of-sight direction of the virtual object facing the target transformation region based on the first line-of-sight direction, the incidence direction of the first line-of-sight direction relative to the start transformation region being the same as the incidence direction of the second line-of-sight direction relative to the target transformation region, and determining the orientation of the transformation region virtual camera as the exit direction of the second line-of-sight direction.
11. The method of claim 9, wherein, The step of rendering the target image to obtain the target texture comprises: rendering the target image to obtain the target texture when the line-of-sight of the virtual object moves; rendering the target image to obtain the target texture using a camera perspective rendering frame rate of the transformation region virtual camera, the camera perspective rendering frame rate being determined according to the distance between the virtual object and the start transformation region, and the camera perspective rendering frame rate being less than or equal to the rendering frame rate of other regions in the graphical user interface except the target texture; performing intersection test between a geometric model of the shape of the start transformation region and a camera frustum of the virtual object perspective to obtain a test result, and canceling the rendering process of the target image if the test result is that the geometric model is not in the camera frustum; rendering the target image to obtain the target texture based on a camera resolution of the transformation region virtual camera, the camera resolution being determined according to the distance between the virtual object and the start transformation region, and the camera resolution being less than or equal to the resolution of other regions in the graphical user interface except the target texture.
12. The method of claim 9, wherein, The step of rendering the target image to obtain the target texture comprises: performing the following steps using a recursive function loop based on a preset maximum number of recursions until it is determined that there is no other start transformation region except the current start transformation region in the perspective of the current transformation region virtual camera bound to the current target transformation region, rendering the target image to obtain the target texture based on the determined start transformation regions; performing intersection test between a geometric model of the shape of the start transformation region and a camera frustum of the current transformation region virtual camera perspective to obtain a test result; determining whether there is another starting transformation region in addition to the current starting transformation region in the current transformation region virtual camera view according to the test result; if yes, taking the other starting transformation region as the current starting transformation region in the next recursive determination process.
13. The method of claim 1, wherein, The step of controlling the display of the virtual object in the target game scene corresponding to the target transformation region based on the second movement information comprises: copying the object model of the virtual object transformed by the scene transformation region, the appearance and action of the two copied object models being consistent; determining a first partial object model in one of the two object models on the side of the starting transformation region, and determining a second partial object model in the other object model on the side of the target transformation region; displaying the first partial object model in the starting transformation region based on the first movement information and displaying the second partial object model in the target transformation region based on the second movement information in a graphical user interface.
14. An electronic terminal comprising a memory, a processor, said memory having stored therein a computer program executable on said processor, characterized in that, The processor executes the computer program to implement the steps of the method of any one of claims 1 to 13.
15. A computer-readable storage medium, characterized in that, The computer readable storage medium stores machine executable instructions, and when the processor calls and executes the computer executable instructions, the computer executable instructions cause the processor to execute the method of any one of claims 1 to 13.
Citation Information
Patent Citations
Program, information processing device, and information processing method
JP2019145161A