Model display method, device, apparatus, medium, and program
By providing a graphical user interface through terminal devices, the virtual camera automatically adjusts its angle to display different parts of the virtual model, solving the problem of a fixed lens angle in existing technologies and improving the user experience.
Patent Information
- Application Number
- CN202411959280.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-27
- Publication Date
- 2025-11-25
- Estimated Expiration
- 2044-12-27
AI Technical Summary
In existing technologies, the model size remains unchanged after a character changes clothes, so the camera angle does not need to be changed, which reduces the player's experience.
The virtual camera, provided by the terminal device with a graphical user interface, captures different angles of the target virtual model in the virtual display scene, and automatically adjusts the camera position and angle in response to user input to display different parts of the model.
This allows users to accurately view different parts of a target virtual model without having to manually move the virtual camera, thus improving the user experience.
Smart Images

Figure CN119868936B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of games, in particular to a model display method, device, equipment, medium and program. BACKGROUND
[0002] In a game, a player usually assumes a certain role, such as playing a ship, a character role, etc., which is usually presented in the form of a model. In addition, various modifications of the model are usually provided, such as the modification of the clothes of a character, the modification of the sails of a ship, etc. This model dressing usually needs an exhibition scene.
[0003] In the prior technical solution, a corresponding lens position is set in the exhibition scene according to the size of each role model, so that the role appears to be of moderate size in the lens. When the role is changed, the model size of the changed role does not change, so the lens angle does not need to be changed.
[0004] In the prior method, only the overall dressing of the role is suitable, and the size does not change. The lens position needs to be manually adjusted for each role, which reduces the experience of the player. SUMMARY
[0005] Therefore, the embodiments of the present application provide a model display method, device, equipment, medium and program to solve the problem of poor player experience.
[0006] In a first aspect, the embodiments of the present application provide a virtual model display method, which provides a graphical user interface through a terminal device, the graphical user interface including: a virtual exhibition scene, the virtual exhibition scene having a target virtual model; the method including:
[0007] displaying a first display model of the target virtual model in the virtual exhibition scene, the first display model being a display model captured by a virtual camera at a current position of the target virtual model;
[0008] in response to an input display switching operation, controlling the virtual camera to move from the current position to a target position corresponding to the display switching operation, and obtaining a second display model of the target virtual model, the second display model being a display model captured by the virtual camera at the target position of the target virtual model;
[0009] updating and displaying the first display model in the virtual exhibition scene as the second display model.
[0010] In a second aspect, the embodiments of the present application provide a virtual model display device. The device provides a graphical user interface through a terminal device, the graphical user interface comprising: a virtual display scene, the virtual display scene having a target virtual model; and the device comprising:
[0011] a display module configured to display a first display model of the target virtual model in the virtual display scene, the first display model being a display model captured by a virtual camera at a current position of the virtual camera;
[0012] a switching module configured to, in response to an input display switching operation, control the virtual camera to move from the current position to a target position corresponding to the display switching operation, and acquire a second display model of the target virtual model, the second display model being a display model captured by the virtual camera at the target position of the virtual camera;
[0013] an updating module configured to update the first display model in the virtual display scene to the second display model.
[0014] In a third aspect, the embodiments of the present application provide an electronic device, comprising: a processor, a storage medium, and a bus. The storage medium stores machine readable instructions executable by the processor. When the electronic device is running, the processor communicates with the storage medium through the bus. The processor executes the machine readable instructions to perform the steps of the model display method according to any one of the first aspect.
[0015] In a fourth aspect, the embodiments of the present application provide a computer readable storage medium, the computer readable storage medium storing a computer program. When the computer program is executed by a processor, the steps of the model display method according to any one of the first aspect are performed.
[0016] In a fifth aspect, the embodiments of the present application provide computer program instructions. When the computer program instructions are executed by a processor, the steps of the model display method according to any one of the first aspect are implemented.
[0017] Compared with the prior art, the present application has the following beneficial effects:
[0018] The application provides a model display method, device, equipment, medium and program. A graphical user interface is provided through a terminal device, the graphical user interface includes: a virtual display scene, the virtual display scene has a target virtual model; a first display model of the target virtual model is displayed in the virtual display scene, the first display model is a display model captured by a virtual camera at a current position on the target virtual model; in response to an input display switching operation, the virtual camera is controlled to move from the current position to a target position corresponding to the display switching operation, and a second display model of the target virtual model is acquired, the second display model is a display model captured by the virtual camera at the target position on the target virtual model; and the first display model in the virtual display scene is updated and displayed as the second display model. Thus, the virtual camera is adapted to different parts of the target virtual model, and the target virtual model at different angles is automatically displayed, so that the user can timely and accurately watch different parts of the target virtual model, without manually moving the virtual camera, and the user experience is improved. BRIEF DESCRIPTION OF DRAWINGS
[0019] In order to more clearly illustrate the technical solutions of the embodiments of the application, the following will briefly introduce the drawings needed to be used in the embodiments. It should be understood that the following drawings only show some of the embodiments of the application, and therefore should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can also be obtained without creative labor.
[0020] Figure 1 A flowchart of a virtual model display method provided by the embodiments of the application;
[0021] Figure 2 A flowchart of a scaling method of a target virtual model provided by the embodiments of the application;
[0022] Figure 3 A flowchart of a method of controlling a virtual camera to move to a target position provided by the embodiments of the application;
[0023] Figure 4 A flowchart of a method of displaying a second display model provided by the embodiments of the application;
[0024] Figure 5 A schematic diagram of a virtual model display device provided by the embodiments of the application;
[0025] Figure 6 A structural schematic diagram of an electronic device provided by the embodiments of the application.
[0026] Icon: 501-display module, 502-switching module, 503-updating module, 601-processor, 602-storage medium, 603-bus. DETAILED DESCRIPTION
[0027] In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the following will be combined with the accompanying drawings for the embodiments of the present application to clearly and completely describe the technical solutions of the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments of the present application. The components of the embodiments of the present application described and shown in the accompanying drawings can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the claimed present application, but only represents selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative work fall within the scope of protection of the present application.
[0028] In an embodiment of the present application, a virtual model display method can run on a local terminal device or a server. When the virtual model display method runs on the server, the method can be implemented and executed based on a cloud interaction system, wherein the cloud interaction system includes the server and a client device.
[0029] In a possible implementation, the embodiment of the present application provides a virtual model display method, a graphical user interface is provided by a terminal device, the graphical user interface includes: a virtual display scene, the virtual display scene has a target virtual model; wherein the terminal device can be the aforementioned local terminal device, or the aforementioned client device in the cloud interaction system.
[0030] In a possible implementation, the graphical user interface is a game interface, the virtual display scene is an exhibition scene created in advance in the game interface, and the target virtual model can be placed in the virtual scene after the creation. For example, the target virtual model can be a ship model.
[0031] Figure 1 A flowchart of a virtual model display method provided by the embodiment of the present application is shown in FIG. 1. As shown in FIG. 1, the method includes: Figure 1
[0032] S101, displaying a first display model of a target virtual model in a virtual display scene.
[0033] The first display model is a display model of the target virtual model captured by a virtual camera at a current position.
[0034] For example, a virtual camera can be placed at multiple positions in the virtual scene. By capturing and displaying the target virtual model through the virtual camera, a target virtual model displayed from multiple angles, i.e., the first display model, can be obtained.
[0035] S102, in response to the input display switching operation, controlling the virtual camera to move from a current position to a target position corresponding to the display switching operation, and obtaining a second display model of the target virtual model.
[0036] The second display model is a display model obtained by the virtual camera capturing the target virtual model at the target position.
[0037] The display switching operation is an operation of the user clicking on the graphical user interface. For example, a control for switching is displayed on the graphical user interface, and the user clicks on the control on the graphical user interface to switch the position of the virtual camera.
[0038] The target virtual model is not adjusted in direction after being placed, and in order to display the target virtual model from more angles, only the virtual camera can be controlled to switch the position of the virtual camera, so that the virtual camera captures the target virtual model from different angles, i.e., the second display model.
[0039] S103, updating and displaying the first display model in the virtual display scene as the second display model.
[0040] Each time the position of the virtual camera is switched, the first display model in the virtual display scene is updated and displayed as the second display model, so that the virtual display scene timely displays the target virtual model from different angles. Thus, the virtual camera is adapted to different parts of the target virtual model, and automatically displays the target virtual model from different angles, so that the user can timely and accurately view different parts of the target virtual model without manually moving the virtual camera, thereby improving the user experience.
[0041] For example, taking a ship model as the target virtual model, the user can timely and accurately view different parts of the ship model through the display switching operation.
[0042] To sum up, in the embodiment, a graphical user interface is provided by the terminal device, the graphical user interface includes: a virtual display scene, the virtual display scene has a target virtual model; a first display model of the target virtual model is displayed in the virtual display scene, the first display model is a display model captured by a virtual camera at a current position on the target virtual model; in response to an input display switching operation, the virtual camera is controlled to move from the current position to a target position corresponding to the display switching operation, and a second display model of the target virtual model is acquired, the second display model is a display model captured by the virtual camera at the target position on the target virtual model; and the first display model in the virtual display scene is updated and displayed as the second display model. Thus, the virtual camera is adapted to different parts of the target virtual model, and the target virtual model at different angles is automatically displayed, so that the user can timely and accurately view different parts of the target virtual model without manually moving the virtual camera, and the user experience is improved.
[0043] In the above Figure 1 Based on the corresponding embodiment, the application further provides a scaling method of a target virtual model. Figure 2 A flowchart of a scaling method of a target virtual model provided by the embodiment of the application is shown in FIG. 1. Figure 2 Before the first display model of the target virtual model is displayed in the virtual display scene in S101, the method further includes:
[0044] S201, calculating a scaling ratio of the target virtual model according to a size of a preset reference model and an original size of the target virtual model.
[0045] After the virtual scene is created, a preset reference model of a general standard size is placed as a virtual camera distance reference standard.
[0046] In the virtual scene, the types of virtual models are very diverse, and there are large and small models. The preset reference model in each virtual display scene is a model with the most suitable size based on the current virtual display scene, and the preset reference model is fixed and unchangeable. The model is placed according to the size of the preset reference model, so that the placed model can be completely displayed in the virtual camera.
[0047] Therefore, the scaling ratio of the target virtual model is calculated according to the size of the preset reference model and the original size of the target virtual model, so as to scale the target virtual model.
[0048] S202, scaling the target virtual model according to the scaling ratio.
[0049] According to the scaling ratio, the target virtual model is scaled so that the scaled target virtual model is similar in size to the preset reference model, so that the placed model can be complete in the virtual camera.
[0050] In summary, in the embodiment, according to the size of the preset reference model and the original size of the target virtual model, the scaling ratio of the target virtual model is calculated; and according to the scaling ratio, the target virtual model is scaled. Thus, the placed model can be complete in the virtual camera.
[0051] In the above Figure 2 Based on the corresponding embodiment, in another embodiment of the present application, the scaling ratio of the target virtual model is calculated according to the size of the preset reference model and the original size of the target virtual model in S201, comprising:
[0052] According to the size of the preset reference model on the preset reference plane and the original size of the target virtual model on the preset reference plane, the scaling ratio is calculated.
[0053] For example, if the size (length, width, height) of the preset reference model on the preset reference plane is (l1, w1, h1), and the original size (length, width, height) of the target virtual model on the preset reference plane is (l2, w2, h2), then the scaling factor n is set to the minimum value of l1 / l2, w1 / w2 and h1 / h2. Thus, by setting the scaling ratio from the length, width and height, the target virtual model scaled by the scaling ratio can be complete in the virtual camera.
[0054] In summary, in the embodiment, according to the size of the preset reference model on the preset reference plane and the original size of the target virtual model on the preset reference plane, the scaling ratio is calculated. Thus, by setting the scaling ratio from the length, width and height, the target virtual model scaled by the scaling ratio can be complete in the virtual camera.
[0055] In the above Figure 2 Based on the corresponding embodiment, in another embodiment of the present application, the virtual display scene further comprises a virtual reference object; and before the first display model of the target virtual model is displayed in the virtual display scene in S101, the method further comprises:
[0056] According to the scaling ratio, the virtual reference object is scaled.
[0057] The virtual reference object is a size reference standard for the target virtual model.
[0058] For example, a blue water block (a virtual reference object) is placed at the origin coordinate of the virtual display scene as a size reference standard of the target virtual model. When the target virtual model is placed, the target virtual model can be placed on the blue water block as a standard.
[0059] While the target virtual model is scaled, the virtual reference object is also scaled according to the scaling ratio, so that the target virtual model and the virtual reference object remain the same change, so as to continue to refer to the target virtual model by using the virtual reference object after scaling.
[0060] In summary, in the embodiment, the virtual reference object is scaled according to the scaling ratio. Thus, the target virtual model and the virtual reference object remain the same change, so as to continue to refer to the target virtual model by using the virtual reference object after scaling.
[0061] In the above Figure 1 Based on the corresponding embodiment, in another embodiment of the present application, before the target virtual model is controlled to move from the current position to the target position corresponding to the display switching operation in response to the input display switching operation in S102, and the second display model of the target virtual model is obtained, the method further comprises:
[0062] The display switching operation is determined to be a display triggering operation of a target part of the target virtual model, and the target position is a camera position corresponding to a preset mounting point on the target part.
[0063] In order to accurately display different parts of the target virtual model, target positions are set near preset mounting points of the target parts in advance, and the virtual camera is placed at the target position to capture the target part of the target virtual model. As long as the target part is switched, the camera position is switched to the camera position corresponding to the preset mounting point on the target part. For example, the user clicks on the target part on the graphical user interface to switch from the current part to the target part, and correspondingly, the camera position is also switched.
[0064] For example, taking a ship model as an example, for parts such as rudders or bows, different ships have different sizes, so the camera positions required for the rudders of different ships are different. If the same camera position is set, it will cause the large ship to be unable to be completely captured by the camera. Since the rudder and other parts of the ship are also realized by binding a rudder model to the rudder mounting point of the ship model, each ship will have a rudder mounting point when it is made, without the need for additional addition. The camera position needs to be set to the rudder mounting point outwardly, and it is opposite to the rudder mounting point, and the specific outward extension distance is set by the user, which is not limited here. Correspondingly, each part of the target virtual model has a corresponding mounting point, and then the corresponding camera position is determined according to the mounting point corresponding to each part.
[0065] Or, the input target virtual model is determined to have a target theme, and the display trigger operation of the target theme is determined to be a display switching operation, and the target position is a preset camera position corresponding to the target theme.
[0066] For example, different virtual models have at least one display theme, different display themes have different rendering displays of the virtual models, and the virtual models are also displayed at different angles and heights. Therefore, each theme has a preset camera position. As long as the target theme is switched, the camera position is switched to the preset camera position corresponding to the target theme. For example, the preset position on the graphical user interface (such as the left side of the interface) displays graphical identifiers of multiple display themes, and the user clicks the graphical identifier of the target theme on the graphical user interface to switch to the target theme. Correspondingly, the camera position is also switched.
[0067] Or, the input virtual display scene is determined to have a preset camera position selection trigger operation, and the target position is the preset camera position selected by the preset camera position selection trigger operation.
[0068] In order to diversify the display of the target virtual model, at least one preset display scheme can be designed in advance according to the display requirements. Each preset display scheme has a preset camera position, and the target virtual model can be displayed at the preset camera position. For example, the preset camera position selection control is displayed on the graphical user interface, and the user clicks the control on the graphical user interface. Correspondingly, the camera position is also switched.
[0069] Or, the input target virtual model is determined to have a view angle switching trigger operation, and the target position is the camera position after the view angle switching trigger operation is switched.
[0070] If the target virtual model after switching the display is not completely captured by the virtual camera, and the user cannot completely see the target virtual model, the view angle switching trigger operation can be used to move the camera position forward and backward along the direction between the virtual camera and the target virtual model until the target virtual model after switching the display is completely captured by the virtual camera. For example, the view angle switching control is displayed on the graphical user interface, and the user clicks the control on the graphical user interface to switch the view angle by switching the camera position. Correspondingly, the camera position is also switched.
[0071] Or, the input target virtual model is determined to have a zoom trigger operation, and the target position is the camera position corresponding to the zoom trigger operation.
[0072] If the target virtual model after the switching of the display is captured completely by the virtual camera, in addition to moving the camera position, the camera position can also be kept unchanged, and the target virtual model is scaled until the scaled target virtual model is captured completely by the virtual camera. For example, a scaling control is displayed on the graphical user interface, and the user clicks the control on the graphical user interface to realize the scaling of the virtual model.
[0073] In summary, in the embodiment, the display trigger operation of the target part of the input target virtual model is determined as the display switching operation, and the target position is the camera position corresponding to the preset mounting point on the target part; or the display trigger operation of the target theme of the input target virtual model is determined as the display switching operation, and the target position is the preset camera position corresponding to the target theme; or the preset camera position selection trigger operation in the input virtual display scene is determined as the display switching operation, and the target position is the preset camera position selected by the preset camera position selection trigger operation; or the view angle switching trigger operation of the input target virtual model is determined as the display switching operation, and the target position is the camera position after the switching of the view angle switching trigger operation; or the scaling trigger operation of the input target virtual model is determined as the display switching operation, and the target position is the camera position corresponding to the scaling trigger operation. Thus, the camera position is diversified to realize diversified and multi-angle display of the target virtual model.
[0074] In the above Figure 1 Based on the corresponding embodiment, the embodiment of the present application further provides a method for controlling the virtual camera to move to the target position. Figure 3 A flowchart of a method for controlling the virtual camera to move to the target position provided by the embodiment of the present application is shown in FIG. 6. As shown in FIG. 6, in S102, the virtual camera is controlled to move from the current position to the target position corresponding to the display switching operation, and a second display model of the target virtual model is obtained, which includes the following steps. Figure 3
[0075] S301, a camera movement curve from the current position to the target position is generated according to the target position and the current position.
[0076] S302, the virtual camera in the virtual display scene is controlled to move from the current position to the target position along the camera movement curve, and a display model at each position on the camera movement curve is obtained until the second display model is obtained.
[0077] In the process of controlling the virtual camera to move, the virtual camera is not moved from the current position to the target position in an instant, but is uniformly moved to the target position along the camera movement curve, so that the user can still see the target virtual model in the process of moving the virtual camera. That is, the display model captured by the virtual camera at each position on the camera movement curve is obtained.
[0078] The updating, in S103, of the first display model in the virtual display scene to the second display model comprises:
[0079] S303, updating the first display model to the display model at each position in sequence until the second display model is updated and displayed.
[0080] The display model at each position is updated in real time, so that the user can still see the target virtual model in the process of virtual camera movement.
[0081] In summary, in the embodiment, according to the target position and the current position, a camera movement curve from the current position to the target position is generated, the virtual camera in the virtual display scene is controlled to move from the current position to the target position along the camera movement curve, and the display model at each position on the camera movement curve is obtained until the second display model is obtained, the first display model is updated to the display model at each position in sequence until the second display model is updated and displayed. Thus, the user can still see the target virtual model in the process of virtual camera movement.
[0082] In the above Figure 3 Based on the corresponding embodiment, in another embodiment of the present application, the generation, in S301, of the camera movement curve from the current position to the target position according to the target position and the current position comprises:
[0083] According to the target position and the current position, a preset spline curve function is used to generate the camera movement curve.
[0084] For example, the spline function of the game engine can be used to generate a spatial curve from the current position to the target position as the camera movement curve. The camera movement curve is not the shortest distance curve from the current position to the target position, but is the shortest distance curve ensuring no occlusion, and at any position point on the camera movement curve, the virtual camera can completely capture the target virtual model, so that the movement of the virtual camera does not affect the visual experience of the user.
[0085] In summary, in the embodiment, according to the target position and the current position, a preset spline curve function is used to generate the camera movement curve. Thus, the movement of the virtual camera does not affect the visual experience of the user.
[0086] In the above Figure 3 Based on the corresponding embodiment, in another embodiment of the present application, the control, in S302, of the virtual camera in the virtual display scene to move from the current position to the target position along the camera movement curve comprises:
[0087] According to the preset moving time interval, each position on the camera moving curve is read, and the virtual camera in the virtual display scene is controlled to move from the current position to each position in sequence.
[0088] According to the preset moving time interval, each position on the camera moving curve is read, and the virtual camera in the virtual display scene is controlled to move from the current position to each position in sequence.
[0089] According to the preset moving time interval, each position on the camera moving curve is read, and the virtual camera in the virtual display scene is controlled to move from the current position to each position in sequence.
[0090] In the above Figure 3 Based on the corresponding embodiment, the embodiment of the present application further provides a method for displaying a second display model. Figure 4 A flowchart of a method for displaying a second display model provided by the embodiment of the present application is shown in FIG. 3. Figure 4 As shown in FIG. 3, the first display model is updated to the display model at each position in sequence until the second display model is displayed, which includes the following steps.
[0091] S401, determining whether the display model at each position and the second display model exceed the preset display range of the virtual display scene.
[0092] After switching the position of the virtual camera, it is possible that the display model at each position and the second display model exceed the preset display range of the virtual display scene, which will result in that the user cannot view the complete target virtual model.
[0093] S402, if the display model at each position and the second display model do not exceed the preset display range, the first display model is updated to the display model at each position in sequence until the second display model is displayed.
[0094] If the display model at each position and the second display model do not exceed the preset display range, it indicates that the user can view the complete target virtual model. Therefore, the first display model is updated to the display model at each position in sequence until the second display model is displayed.
[0095] In summary, in the embodiment, it is determined whether the display model of each position and the second display model exceed the preset display range of the virtual display scene; if neither the display model of each position nor the second display model exceeds the preset display range, the first display model is sequentially updated to the display model of each position until the second display model is displayed. Thus, it is ensured that the user can view the complete target virtual model at any time.
[0096] In the above Figure 4 Based on the corresponding embodiment, in another embodiment of the present application, the step of sequentially updating the first display model to the display model of each position until the second display model is displayed in S402 includes:
[0097] If the display model of each position and the second display model exceed the preset display range, the target display model exceeding the preset display range is scaled and the scaled target display model is displayed.
[0098] If the display model of each position or the second display model exceeds the preset display range, the display model or the second display model is scaled until neither the display model of each position nor the second display model exceeds the preset display range, so that the user can view the complete target virtual model.
[0099] In summary, in the embodiment, if the display model of each position and the second display model exceed the preset display range, the target display model exceeding the preset display range is scaled and the scaled target display model is displayed. Thus, it is ensured that the user can view the complete target virtual model at any time.
[0100] The following describes a virtual model display device, equipment, storage medium and program provided by the present application for execution, and the specific implementation process and technical effects are described above. The following will not be described again.
[0101] Figure 5 A schematic diagram of a virtual model display device provided by an embodiment of the present application is shown in FIG. 1. A graphical user interface is provided by a terminal device, and the graphical user interface includes: a virtual display scene, and the virtual display scene has a target virtual model. Figure 5 As shown in FIG. 1, the device includes:
[0102] The display module 501 is configured to display a first display model of the target virtual model in the virtual display scene, and the first display model is a display model captured by a virtual camera at a current position of the target virtual model.
[0103] The switching module 502 is configured to, in response to an input display switching operation, control the virtual camera to move from a current position to a target position corresponding to the display switching operation, and acquire a second display model of the target virtual model, the second display model being a display model of the target virtual model captured by the virtual camera at the target position;
[0104] The updating module 503 is configured to update the first display model in the virtual display scene to the second display model.
[0105] Further, the display module 501 is further configured to calculate a scaling ratio of the target virtual model according to a size of the preset reference model and an original size of the target virtual model, and scale the target virtual model according to the scaling ratio.
[0106] Further, the display module 501 is specifically configured to calculate the scaling ratio according to a size of the preset reference model on a preset reference plane and an original size of the target virtual model on the preset reference plane.
[0107] Further, the display module 501 is further configured to scale the virtual reference object according to the scaling ratio.
[0108] Further, the switching module 502 is further configured to determine that the input display trigger operation of the target part of the target virtual model is the display switching operation, and the target position is a camera position corresponding to a preset mounting point on the target part; or determine that the input display trigger operation of the target theme of the target virtual model is the display switching operation, and the target position is a preset camera position corresponding to the target theme; or determine that the input preset camera position selection trigger operation in the virtual display scene is the display switching operation, and the target position is a preset camera position selected by the preset camera position selection trigger operation; or determine that the input view angle switching trigger operation of the target virtual model is the display switching operation, and the target position is a camera position after the view angle switching trigger operation; or determine that the input scaling trigger operation of the target virtual model is the display switching operation, and the target position is a camera position corresponding to the scaling trigger operation.
[0109] Further, the switching module 502 is specifically configured to generate a camera movement curve from the current position to the target position according to the target position and the current position, control the virtual camera in the virtual display scene to move from the current position to the target position along the camera movement curve, and acquire display models at positions on the camera movement curve until the second display model is obtained, and update the first display model to the display models at the positions in sequence until the second display model is displayed.
[0110] Further, the switching module 502 is specifically configured to generate the camera movement curve by using a preset spline curve function according to the target position and the current position.
[0111] Further, the switching module 502 is specifically configured to read each position on the camera movement curve according to a preset movement time interval, and control the virtual camera in the virtual display scene to move from a current position to each position in sequence.
[0112] Further, the switching module 502 is specifically configured to determine whether the display model of each position and the second display model exceed a preset display range of the virtual display scene; if the display model of each position and the second display model do not exceed the preset display range, the first display model is updated to the display model of each position in sequence until the second display model is displayed.
[0113] Further, the switching module 502 is specifically configured to, if the display model of each position and the second display model exceed the preset display range, perform scaling processing on a target display model exceeding the preset display range, and display the target display model after the scaling processing.
[0114] In the above manner, the first display model of the target virtual model is displayed in the virtual display scene, the first display model is a display model captured by the virtual camera at a current position on the target virtual model; in response to an input display switching operation, the virtual camera is controlled to move from the current position to a target position corresponding to the display switching operation, and a second display model of the target virtual model is obtained, the second display model is a display model captured by the virtual camera at the target position on the target virtual model; the first display model in the virtual display scene is updated and displayed as the second display model. Thus, the virtual camera is adapted to different parts of the target virtual model, and different angle target virtual models are automatically displayed, so that the user can timely and accurately view different parts of the target virtual model without manually moving the virtual camera, and the user experience is improved.
[0115] Figure 6 A structural schematic diagram of an electronic device provided by an embodiment of the present application includes a processor 601, a storage medium 602, and a bus 603. The storage medium 602 stores machine-readable instructions executable by the processor 601. The processor 601 and the storage medium 602 communicate through the bus 603. The processor 601 executes the machine-readable instructions to perform the above method.
[0116] In the virtual display scene, a first display model of the target virtual model is displayed, the first display model being a display model captured by a virtual camera at a current position on the target virtual model;
[0117] In response to the input display switching operation, the virtual camera is controlled to move from a current position to a target position corresponding to the display switching operation, and a second display model of the target virtual model is obtained, the second display model being a display model of the target virtual model captured by the virtual camera at the target position;
[0118] The first display model in the virtual display scene is updated and displayed as the second display model.
[0119] Optionally, before displaying the first display model of the target virtual model in the virtual display scene, the method further comprises:
[0120] According to the size of the preset reference model and the original size of the target virtual model, a scaling ratio of the target virtual model is calculated;
[0121] According to the scaling ratio, the target virtual model is scaled.
[0122] Optionally, according to the size of the preset reference model and the original size of the target virtual model, the scaling ratio of the target virtual model is calculated, comprising:
[0123] According to the size of the preset reference model on the preset reference plane and the original size of the target virtual model on the preset reference plane, the scaling ratio is calculated.
[0124] Optionally, the virtual display scene further comprises a virtual reference object, and before displaying the first display model of the target virtual model in the virtual display scene, the method further comprises:
[0125] According to the scaling ratio, the virtual reference object is scaled.
[0126] Optionally, before the virtual camera is controlled to move from the current position to the target position corresponding to the display switching operation and the second display model of the target virtual model is obtained in response to the input display switching operation, the method further comprises:
[0127] The display triggering operation of the target part of the target virtual model input is determined to be the display switching operation, and the target position is a camera position corresponding to a preset mounting point on the target part; or
[0128] The display triggering operation of the target theme of the target virtual model input is determined to be the display switching operation, and the target position is a preset camera position corresponding to the target theme; or
[0129] The preset camera position selection triggering operation in the virtual display scene input is determined to be the display switching operation, and the target position is a preset camera position selected by the preset camera position selection triggering operation; or
[0130] The view angle switching trigger operation of the input target virtual model is determined as a display switching operation, and the target position is a camera position after the view angle switching trigger operation is switched; or
[0131] The zoom trigger operation of the input target virtual model is determined as a display switching operation, and the target position is a camera position corresponding to the zoom trigger operation.
[0132] Optionally, the virtual camera is controlled to move from the current position to the target position corresponding to the display switching operation, and a second display model of the target virtual model is obtained, including:
[0133] According to the target position and the current position, a camera movement curve from the current position to the target position is generated;
[0134] The virtual camera in the virtual display scene is controlled to move from the current position to the target position along the camera movement curve, and display models at various positions on the camera movement curve are obtained until the second display model is obtained;
[0135] The first display model in the virtual display scene is updated and displayed as the second display model, including:
[0136] The first display model is sequentially updated to the display models at the various positions until the second display model is updated and displayed.
[0137] Optionally, according to the target position and the current position, a camera movement curve from the current position to the target position is generated, including:
[0138] According to the target position and the current position, a preset spline curve function is used to generate the camera movement curve.
[0139] Optionally, the virtual camera in the virtual display scene is controlled to move from the current position to the target position along the camera movement curve, including:
[0140] According to a preset movement time interval, various positions on the camera movement curve are read, and the virtual camera in the virtual display scene is controlled to sequentially move from the current position to the various positions.
[0141] Optionally, the first display model is sequentially updated to the display models at the various positions until the second display model is updated and displayed, including:
[0142] It is determined whether the display models at the various positions and the second display model exceed a preset display range of the virtual display scene;
[0143] If the display models at the various positions and the second display model do not exceed the preset display range, the first display model is sequentially updated to the display models at the various positions until the second display model is updated and displayed.
[0144] Optionally, the first display model is sequentially updated to the display model of each position until the display of the second display model is updated, comprising:
[0145] If the display model of each position and the second display model exceed the preset display range, the target display model exceeding the preset display range is scaled and the scaled target display model is displayed.
[0146] In the above manner, the first display model of the target virtual model is displayed in the virtual display scene, the first display model is a display model captured by the virtual camera at the current position on the target virtual model; in response to the input display switching operation, the virtual camera is controlled to move from the current position to the target position corresponding to the display switching operation, and the second display model of the target virtual model is obtained, the second display model is a display model captured by the virtual camera at the target position on the target virtual model; the first display model in the virtual display scene is updated and displayed as the second display model. Thus, the virtual camera is adapted to different parts of the target virtual model, and the target virtual model at different angles is automatically displayed, so that the user can timely and accurately view different parts of the target virtual model without manually moving the virtual camera, thereby improving the user experience.
[0147] The embodiment of the application further provides a computer readable storage medium, and the computer readable storage medium stores a computer program, and the computer program is run by a processor to execute the above-mentioned method embodiment.
[0148] In the virtual display scene, the first display model of the target virtual model is displayed, and the first display model is a display model captured by the virtual camera at the current position on the target virtual model;
[0149] In response to the input display switching operation, the virtual camera is controlled to move from the current position to the target position corresponding to the display switching operation, and the second display model of the target virtual model is obtained, and the second display model is a display model captured by the virtual camera at the target position on the target virtual model;
[0150] The first display model in the virtual display scene is updated and displayed as the second display model.
[0151] Optionally, before the first display model of the target virtual model is displayed in the virtual display scene, the method further comprises:
[0152] According to the size of the preset reference model and the original size of the target virtual model, the scaling ratio of the target virtual model is calculated;
[0153] According to the scaling ratio, the target virtual model is scaled.
[0154] Optionally, the scaling ratio of the target virtual model is calculated according to a size of the preset reference model and an original size of the target virtual model, including:
[0155] The scaling ratio is calculated according to a size of the preset reference model on the preset reference plane and an original size of the target virtual model on the preset reference plane.
[0156] Optionally, the virtual display scene further includes a virtual reference object, and before the first display model of the target virtual model is displayed in the virtual display scene, the method further includes:
[0157] The virtual reference object is scaled according to the scaling ratio.
[0158] Optionally, in response to the input display switching operation, the method further includes:
[0159] The input display triggering operation of the target part of the target virtual model is determined to be the display switching operation, and the target position is a camera position corresponding to a preset mounting point on the target part; or,
[0160] The input display triggering operation of the target theme of the target virtual model is determined to be the display switching operation, and the target position is a preset camera position corresponding to the target theme; or,
[0161] The input preset camera position selection triggering operation in the virtual display scene is determined to be the display switching operation, and the target position is a preset camera position selected by the preset camera position selection triggering operation; or,
[0162] The input view angle switching triggering operation of the target virtual model is determined to be the display switching operation, and the target position is a camera position after the view angle switching triggering operation; or,
[0163] The input scaling triggering operation of the target virtual model is determined to be the display switching operation, and the target position is a camera position corresponding to the scaling triggering operation.
[0164] Optionally, controlling the virtual camera to move from the current position to the target position corresponding to the display switching operation and obtaining the second display model of the target virtual model includes:
[0165] According to the target position and the current position, a camera movement curve from the current position to the target position is generated;
[0166] The virtual camera in the virtual display scene is controlled to move from the current position to the target position along the camera movement curve, and display models at each position on the camera movement curve are obtained until the second display model is obtained;
[0167] updating a first display model in a virtual display scene to display a second display model, comprising:
[0168] updating the first display model to display models at respective positions in sequence until the second display model is displayed.
[0169] Optionally, a camera movement curve from the current position to the target position is generated according to the target position and the current position, comprising:
[0170] According to the target position and the current position, a preset spline curve function is used to generate the camera movement curve.
[0171] Optionally, the virtual camera in the virtual display scene is controlled to move from the current position to the target position along the camera movement curve, comprising:
[0172] According to a preset movement time interval, positions on the camera movement curve are read, and the virtual camera in the virtual display scene is controlled to move from the current position to the respective positions in sequence.
[0173] Optionally, the first display model is updated to display models at respective positions in sequence until the second display model is displayed, comprising:
[0174] It is determined whether the display models at the respective positions and the second display model exceed a preset display range of the virtual display scene.
[0175] If neither the display models at the respective positions nor the second display model exceeds the preset display range, the first display model is updated to display models at respective positions in sequence until the second display model is displayed.
[0176] Optionally, the first display model is updated to display models at respective positions in sequence until the second display model is displayed, comprising:
[0177] If the display models at the respective positions and the second display model exceed the preset display range, a target display model exceeding the preset display range is scaled, and the scaled target display model is displayed.
[0178] In the above manner, the first display model of the target virtual model is displayed in the virtual display scene, the first display model being a display model captured by the virtual camera at a current position on the target virtual model; in response to an input display switching operation, the virtual camera is controlled to move from the current position to a target position corresponding to the display switching operation, and a second display model of the target virtual model is acquired, the second display model being a display model captured by the virtual camera at the target position on the target virtual model; and the first display model in the virtual display scene is updated and displayed as the second display model. Thus, the virtual camera is adapted to different parts of the target virtual model, and automatically displays the target virtual model at different angles, so that the user can timely and accurately view different parts of the target virtual model without manually moving the virtual camera, thereby improving the user experience.
[0179] In the embodiments of the present application, the computer program can also execute other machine-readable instructions when executed by the processor to perform the methods described in the embodiments, and the specific method steps and principles are described in the embodiments, which will not be described in detail here.
[0180] In the embodiments provided in the present application, it should be understood that the disclosed device and method can be implemented by other means. The device embodiments described above are only schematic, for example, the division of the units is only a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units shown or discussed can be indirect coupling or communication connection through some communication interface, device or unit, which can be electrical, mechanical or other forms.
[0181] The units described as separate components can or can not be physically separated, and the components shown as units can or can not be physical units, i.e. they can be located in one place or distributed on multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the present embodiment.
[0182] In addition, each functional unit in the embodiments provided in the present application can be integrated in one processing unit, or each unit can exist physically, or two or more units can be integrated in one unit.
[0183] If the functions are implemented in the form of software function units and sold or used as independent products, they can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application essentially or the parts that contribute to the prior art or parts of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a number of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various media that can store program codes.
[0184] It should be noted that similar reference numbers and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. In addition, the terms "first", "second", "third" and the like are only used to distinguish the description and cannot be understood as indicating or implying relative importance.
[0185] Finally, it should be noted that the above-described embodiments are only specific implementations of the present application, which are used to illustrate the technical solutions of the present application, but not to limit them. Although the present 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 modify or easily think of changes to the technical solutions described in the foregoing embodiments within the technical scope disclosed by the present application, or make equivalent replacements to some technical features. These modifications, changes or replacements do not cause the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application. They should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A method for displaying virtual models, characterized in that, A graphical user interface is provided via a terminal device, the graphical user interface including: a virtual display scene, the virtual display scene having a target virtual model; the method includes: A first display model of the target virtual model is displayed in the virtual display scene. The first display model is a display model captured by the virtual camera at the current position of the target virtual model. In response to the input display switching operation, the virtual camera is controlled to move from the current position to the target position corresponding to the display switching operation, and a second display model of the target virtual model is obtained, wherein the second display model is the display model obtained by the virtual camera capturing the target virtual model at the target position; Update the first display model in the virtual display scene to display the second display model; The step of controlling the virtual camera to move from its current position to the target position corresponding to the display switching operation, and obtaining the second display model of the target virtual model, includes: Based on the target position and the current position, a camera movement curve from the current position to the target position is generated using a preset spline curve function; Control the virtual camera in the virtual display scene to move from the current position along the camera movement curve to the target position, and obtain the display model at each position on the camera movement curve until the second display model is obtained; The step of updating the first display model in the virtual display scene to the second display model includes: The first display model is sequentially updated to the display models at each of the aforementioned locations until the second display model is updated and displayed.
2. The method according to claim 1, characterized in that, Before displaying the first display model of the target virtual model in the virtual display scene, the method further includes: Calculate the scaling ratio of the target virtual model based on the size of the preset baseline model and the original size of the target virtual model; The target virtual model is scaled according to the scaling ratio.
3. The method according to claim 2, characterized in that, The step of calculating the scaling ratio of the target virtual model based on the size of the preset baseline model and the original size of the target virtual model includes: The scaling ratio is calculated based on the dimensions of the preset baseline model on the preset reference plane and the original dimensions of the target virtual model on the preset reference plane.
4. The method according to claim 2, characterized in that, The virtual display scene further includes: a virtual reference object; before displaying the first display model of the target virtual model in the virtual display scene, the method further includes: The virtual reference object is scaled according to the scaling ratio.
5. The method according to claim 1, characterized in that, Before responding to the display switching operation input, controlling the virtual camera to move from the current position to the target position corresponding to the display switching operation, and acquiring the second display model of the target virtual model, the method further includes: The display trigger operation for the target part of the input target virtual model is determined to be the display switching operation, and the target position is the camera position corresponding to the preset mounting point on the target part; or... The display trigger operation for the target theme of the input target virtual model is determined to be the display switching operation, and the target position is the preset camera position corresponding to the target theme; or... The input virtual display scene is determined to have a preset camera position selection trigger operation as the display switching operation, and the target position is the preset camera position selected by the preset camera position selection trigger operation; or... The viewpoint switching trigger operation of the input target virtual model is determined to be the display switching operation, and the target position is the camera position after the viewpoint switching trigger operation; or... The scaling trigger operation of the input target virtual model is determined to be the display switching operation, and the target position is the camera position corresponding to the scaling trigger operation.
6. The method according to claim 1, characterized in that, The control of the virtual camera in the virtual display scene to move from the current position to the target position along the camera movement curve includes: According to a preset movement time interval, the positions on the camera movement curve are read, and the virtual camera in the virtual display scene is controlled to move sequentially from the current position to each of the positions.
7. The method according to claim 1, characterized in that, The step of sequentially updating the first display model to the display models at each of the aforementioned positions until the second display model is displayed includes: Determine whether the display model at each location and the second display model exceed the preset display range of the virtual display scene; If neither the display model at each location nor the second display model exceeds the preset display range, then the first display model is sequentially updated to the display model at each location until it is updated to the second display model.
8. The method according to claim 7, characterized in that, The step of sequentially updating the first display model to the display models at each of the aforementioned positions until the second display model is displayed includes: If the display model at each location and the second display model exceed the preset display range, the target display model that exceeds the preset display range is scaled, and the scaled target display model is displayed.
9. A virtual model display device, characterized in that, A graphical user interface is provided via a terminal device, the graphical user interface including: a virtual display scene, the virtual display scene having a target virtual model; the device includes: The display module is used to display a first display model of the target virtual model in the virtual display scene. The first display model is a display model captured by the virtual camera at the current position of the target virtual model. The switching module is used to respond to the input display switching operation, control the virtual camera to move from the current position to the target position corresponding to the display switching operation, and obtain the second display model of the target virtual model. The second display model is the display model obtained by the virtual camera capturing the target virtual model at the target position. The update module is used to update the first display model in the virtual display scene to the second display model; The switching module is specifically used to generate a camera movement curve from the current position to the target position using a preset spline curve function, based on the target position and the current position. The virtual camera in the virtual display scene is controlled to move from the current position along the camera movement curve to the target position, and the display model at each position on the camera movement curve is obtained until the second display model is obtained; the first display model is sequentially updated to the display model at each position until the second display model is updated and displayed.
10. An electronic device, characterized in that, include: The device includes a processor, a storage medium, and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor communicates with the storage medium via the bus, and the processor executes the machine-readable instructions to perform the steps of the model demonstration method as described in any one of claims 1 to 8.
11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, performs the steps of the model representation method as described in any one of claims 1 to 8.
12. A computer program product, characterized in that, When the program product is executed by the processor, it implements the steps of the model display method as described in any one of claims 1 to 8.
Citation Information
Patent Citations
A data synchronization method and system for multi-player batter games
CN106984043A
Virtual model generation method and device, storage medium and electronic device
CN111462204A