Model display method and device, equipment, medium and program
By using terminal devices to provide a graphical user interface in the game, the virtual camera captures and automatically adjusts the angle to display the game model, solving the problem of users in the prior art that manually adjust the lens and improving the user experience.
Patent Information
- Application Number
- CN202411959280.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-27
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2044-12-27
AI Technical Summary
When the existing technology is displayed in the game, it is impossible to automatically adapt to the display of models from different angles, which leads to users needing to manually adjust the camera position, reducing the player's experience.
The graphical user interface is provided through the terminal device, and the virtual display scene has a target virtual model. The virtual camera captures the model and switches the display according to the user input, moves to the target position, obtains model displays from different angles, and updates the display in real time.
The virtual camera is automatically adapted to different parts of the target virtual model, and automatically displays the target virtual model from different angles, improving the user experience, and users do not need to manually move the virtual camera.
Smart Images

Figure CN119868936A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of game technology, and in particular to a model display method, device, equipment, medium and program. Background Art
[0002] In the game, players usually take on a role, such as a ship, a character, etc., which is usually presented in the form of a model. In addition, various modifications of the model are usually provided, such as the character's clothing, the modification of the ship's sails and other parts. This model dressing usually requires an exhibition scene.
[0003] In the existing technical solutions, a corresponding lens position is usually set according to the size of each character model in the exhibition scene, so that the character appears to be of moderate size in the lens. When the character changes clothes, the size of the model after the change of clothes remains unchanged, so the lens angle does not need to be changed.
[0004] The existing method is only suitable for changing the overall costume of the character without changing the size. The camera position needs to be manually adjusted for each character, which reduces the player's experience. Summary of the invention
[0005] In view of this, 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, an embodiment of the present application provides a virtual model display method, which provides a graphical user interface through a terminal device, wherein the graphical user interface includes: a virtual display scene, wherein the virtual display scene has a target virtual model; the method includes:
[0007] Displaying a first display model of the target virtual model in the virtual display scene, where the first display model is a display model captured by a virtual camera at a current position of the target virtual model;
[0008] In response 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 a second display model of the target virtual model, where the second display model is a display model obtained by capturing the target virtual model at the target position by the virtual camera;
[0009] The first presentation model in the virtual presentation scene is updated and displayed as the second presentation model.
[0010] In a second aspect, an embodiment of the present application provides a virtual model display device, which provides a graphical user interface through a terminal device, wherein the graphical user interface includes: a virtual display scene, wherein the virtual display scene has a target virtual model; the device includes:
[0011] A display module, configured to display a first display model of the target virtual model in the virtual display scene, wherein the first display model is a display model captured by a virtual camera at a current position of the target virtual model;
[0012] a switching module, configured to respond 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 obtain a second display model of the target virtual model, where the second display model is a display model obtained by capturing the target virtual model at the target position by the virtual camera;
[0013] An updating module is used to update and display the first display model in the virtual display scene to the second display model.
[0014] In a third aspect, an embodiment of the present application provides an electronic device, comprising: 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 display method as described in any one of the first aspects.
[0015] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the model display method as described in any one of the first aspects are executed.
[0016] In a fifth aspect, an embodiment of the present application provides a computer program instruction, which, when executed by a processor, implements the steps of the model display method as described in any one of the first aspects.
[0017] Compared with the prior art, this application has the following beneficial effects:
[0018] The present application provides a model display method, device, equipment, medium and program. A graphical user interface is provided through a terminal device, and the graphical user interface includes: a virtual display scene, in which a target virtual model is provided; a first display model of the target virtual model is displayed 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; 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, and the second display model is a display model obtained by capturing the target virtual model at a target position by a virtual camera; 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 view different parts of the target virtual model in a timely and accurate manner without the need for the user to manually move the virtual camera, thereby improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0020] Figure 1 A flowchart of a virtual model display method provided in an embodiment of the present application;
[0021] Figure 2 A schematic diagram of a process of scaling a target virtual model provided in an embodiment of the present application;
[0022] Figure 3 A flowchart of a method for controlling a virtual camera to move to a target position provided in an embodiment of the present application;
[0023] Figure 4 A schematic flow chart of a method for displaying a second display model provided in an embodiment of the present application;
[0024] Figure 5 A schematic diagram of a virtual model display device provided in an embodiment of the present application;
[0025] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
[0026] Icon: 501 - display module, 502 - switching module, 503 - update module, 601 - processor, 602 - storage medium, 603 - bus. DETAILED DESCRIPTION
[0027] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. The components of the embodiments of the present application generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the 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 making creative work belong to the scope of protection of the present application.
[0028] In one embodiment of the present application, a virtual model display method can be run on a local terminal device or a server. When a virtual model display method is run on a server, the method can be implemented and executed based on a cloud interaction system, wherein the cloud interaction system includes a server and a client device.
[0029] In a possible implementation, an embodiment of the present invention provides a virtual model display method, providing a graphical user interface through a terminal device, the graphical user interface including: a virtual display scene, the virtual display scene having a target virtual model; wherein the terminal device can be the local terminal device mentioned above, or it can be a client device in the cloud interaction system mentioned above.
[0030] In a possible implementation, the graphical user interface is a game interface, and the virtual display scene is an exhibition scene pre-created in the game interface. After the creation is completed, a target virtual model can be placed in the virtual scene. For example, the target virtual model can be a ship model.
[0031] Figure 1 This is a flow chart of a virtual model display method provided in an embodiment of the present application. Figure 1 As shown, the method includes:
[0032] S101: Display a first display model of a target virtual model in a virtual display scene.
[0033] The first display model is a display model captured by the virtual camera at the current position of the target virtual model.
[0034] For example, virtual cameras may be placed at multiple locations in the virtual scene. By capturing and displaying the target virtual model through the virtual cameras, the target virtual model displayed at multiple angles may be obtained, that is, the first display model.
[0035] S102 . In response 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 a second display model of the target virtual model.
[0036] The second display model is a display model obtained by capturing the target virtual model at the target position by the virtual camera.
[0037] The display switching operation is an operation of a user clicking on a graphical user interface. For example, a control for switching is displayed on the graphical user interface, and the user clicks the control on the graphical user interface to implement the position switching of the virtual camera.
[0038] The direction of the target virtual model will not be adjusted after it is placed. In order to display the target virtual model at more angles, the virtual camera can only be controlled to switch the position of the virtual camera so that the virtual camera captures the target virtual model at different angles at different positions, that is, the second display model.
[0039] S103: Update and display the first display model in the virtual display scene as a 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 can display the target virtual model at different angles in a timely manner. Thus, the virtual camera adapts to different parts of the target virtual model and automatically displays the target virtual model at different angles, allowing the user to view different parts of the target virtual model in a timely and accurate manner without the user having to manually move the virtual camera, thereby improving the user experience.
[0041] For example, taking the target virtual model as a ship model, the user can view different parts of the ship model in a timely and accurate manner through display switching operations.
[0042] In summary, in this embodiment, a graphical user interface is provided through a terminal device, and the graphical user interface includes: a virtual display scene, in which there is a target virtual model; a first display model of the target virtual model is displayed 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; 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, and the second display model is a display model captured by the virtual camera at the target position; 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 is automatically displayed at different angles, so that the user can view different parts of the target virtual model in a timely and accurate manner without the need for the user to manually move the virtual camera, thereby improving the user experience.
[0043] In the above Figure 1 On the basis of the corresponding embodiment, the embodiment of the present application also provides a method for scaling a target virtual model. Figure 2 A schematic diagram of a process for scaling a target virtual model provided in an embodiment of the present application. Figure 2 As shown, before displaying the first display model of the target virtual model in the virtual display scene in S101, the method further includes:
[0044] S201: Calculate a scaling ratio of a target virtual model according to a size of a preset reference model and an original size of the target virtual model.
[0045] After creating the virtual scene, place a common preset benchmark model of standard size as a reference standard for the virtual camera distance.
[0046] In a virtual scene, there are many types of virtual models, some large and some small. The preset reference model in each virtual display scene is a model of the most suitable size set based on the current virtual display scene, and the preset reference model is fixed and unchanged. The model is placed at the size of the preset reference model so that the placed model can be fully displayed in the virtual camera.
[0047] Therefore, the scaling ratio of the target virtual model is first 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 fully displayed in the virtual camera.
[0050] In summary, in this embodiment, 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, and the target virtual model is scaled according to the scaling ratio, so that the placed model can be fully displayed in the virtual camera.
[0051] In the above Figure 2 On the basis of the corresponding embodiment, in another embodiment of the present application, the step of calculating the scaling ratio of the target virtual model according to the size of the preset reference model and the original size of the target virtual model in S201 includes:
[0052] The scaling ratio is calculated 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.
[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 is set to n, and the value of n is taken as the minimum value of l1 / l2, w1 / w2 and h1 / h2. Thus, by setting the scaling ratio from the three aspects of length, width and height, the target virtual model scaled by the scaling ratio can be fully displayed in the virtual camera.
[0054] In summary, in this embodiment, the scaling ratio is calculated 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. Thus, by setting the scaling ratio from the three aspects of length, width and height, the target virtual model scaled by the scaling ratio can be fully displayed in the virtual camera.
[0055] In the above Figure 2 On the basis of the corresponding embodiment, in another embodiment of the present application, 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 in S101, the method further includes:
[0056] The virtual reference object is scaled according to the zoom ratio.
[0057] The virtual reference object is a size reference standard used as a target virtual model.
[0058] For example, a blue water block (virtual reference object) is placed at the origin coordinate of the virtual display scene as a size reference standard for the target virtual model. When placing the target virtual model, the blue water block can be used as a standard to place the target virtual model on the blue water block.
[0059] When 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 maintain the same change, so that the scaled virtual reference object can continue to refer to the target virtual model.
[0060] In summary, in this embodiment, the virtual reference object is scaled according to the scaling ratio, so that the target virtual model and the virtual reference object maintain the same change, so that the scaled virtual reference object continues to be used as a reference for the target virtual model.
[0061] In the above Figure 1 On the basis of the corresponding embodiment, in another embodiment of the present application, before responding to the input display switching operation in S102, 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, the method further includes:
[0062] It is determined that the display triggering operation of the target part of the input target virtual model is a display switching operation, 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, the target position is set in advance near the preset mounting points of multiple target parts, and the virtual camera is placed at the target position, so that the target part of the target virtual model can be captured. As long as the target part is switched, the camera position will be 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 the camera position is also switched accordingly.
[0064] For example, taking a ship model as an example, different ships have different sizes for parts such as the rudder or bow, so the camera position required for the rudder of different ships is different. If the same camera position is set, large ships will not be fully 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, and no additional addition is required. The camera position needs to be set to a little outside the rudder mounting point, just opposite the rudder mounting point. The specific outward extension distance is set by the user and is not limited here. Correspondingly, each part of the target virtual model has a corresponding mounting point, and the corresponding camera position is determined according to the corresponding mounting point of each part.
[0065] Alternatively, it is determined that the display triggering operation of the target subject of the input target virtual model is a display switching operation, and the target position is a preset camera position corresponding to the target subject.
[0066] For example, different virtual models will have at least one display theme, and different display themes will render and display the virtual models differently, and will also display the virtual models at different angles and heights. Therefore, each theme corresponds to a preset camera position. As long as the target theme is switched, the camera position will be 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 graphic logos of multiple display themes. The user clicks on the graphic logo of the target theme on the graphical user interface to switch to the target theme, and correspondingly, the camera position is also switched.
[0067] Alternatively, it is determined that the preset camera position selection trigger operation in the input virtual display scene is a display switching operation, and the target position is the preset camera position selected by the preset camera position selection trigger operation.
[0068] In order to display the target virtual model in a diversified manner, at least one preset display scheme may be designed in advance according to the display requirements. Each preset display scheme has a preset camera position, so that the target virtual model can be displayed at the preset camera position. For example, a preset camera position selection control is displayed on the graphical user interface, and the user clicks the control on the graphical user interface, and the camera position is switched accordingly.
[0069] Alternatively, it is determined that the input perspective switching trigger operation of the target virtual model is a display switching operation, and the target position is the camera position after the perspective switching trigger operation is switched.
[0070] If the target virtual model after the display is switched is not completely captured by the virtual camera, and the user cannot see the target virtual model completely, the view 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 the display is switched is completely captured by the virtual camera. For example, a view switching control is displayed on the graphical user interface, and the user clicks the control on the graphical user interface to switch the view switching by switching the camera position, and correspondingly, the camera position is also switched.
[0071] Alternatively, it is determined that the input zoom trigger operation of the target virtual model is a display switching operation, and the target position is a camera position corresponding to the zoom trigger operation.
[0072] If the target virtual model after switching is not completely captured by the virtual camera, in addition to moving the camera position, the camera position can be kept unchanged and the target virtual model can be scaled until the scaled target virtual model is completely captured 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 achieve scaling of the virtual model.
[0073] In summary, in this embodiment, the display trigger operation of the target part of the input target virtual model is determined to be a 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 subject of the input target virtual model is determined to be a display switching operation, and the target position is the preset camera position corresponding to the target subject; or, the preset camera position selection trigger operation in the input virtual display scene is determined to be a display switching operation, and the target position is the preset camera position selected by the preset camera position selection trigger operation; or, the perspective switching trigger operation of the input target virtual model is determined to be a display switching operation, and the target position is the camera position after the perspective switching trigger operation is switched; or, the zoom trigger operation of the input target virtual model is determined to be a display switching operation, and the target position is the camera position corresponding to the zoom trigger operation. Thus, the camera position is determined in a diversified manner, and the target virtual model is displayed in a diversified and multi-angle manner.
[0074] In the above Figure 1 On the basis of the corresponding embodiment, the embodiment of the present application also provides a method for controlling a virtual camera to move to a target position. Figure 3 A flowchart of a method for controlling a virtual camera to move to a target position provided in an embodiment of the present application. Figure 3 As shown, in S102, 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:
[0075] S301. Generate a camera movement curve from the current position to the target position according to the target position and the current position.
[0076] S302: Control a virtual camera in a virtual display scene to move from a current position to a target position along a camera movement curve, and obtain a display model of each position on the camera movement curve until a second display model is obtained.
[0077] In the process of controlling the movement of the virtual camera, the virtual camera is not moved from the current position to the target position in an instant, but is moved to the target position at a constant speed along the camera movement curve, so that the user can still see the target virtual model during the movement of the virtual camera. That is, the display model captured by the virtual camera at each position on the camera movement curve is obtained.
[0078] In S103, updating and displaying the first presentation model in the virtual presentation scene as the second presentation model includes:
[0079] S303: Update the first display model to the display models at each position in sequence until it is updated and displayed as the second display model.
[0080] The display models at various locations are updated in real time so that the user can still see the target virtual model while the virtual camera is moving.
[0081] In summary, in this embodiment, a camera movement curve from the current position to the target position is generated according to the target position and the current position; 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 of 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 of each position in sequence until it is updated and displayed as the second display model. Thus, the user can still see the target virtual model during the movement of the virtual camera.
[0082] In the above Figure 3 On the basis of the corresponding embodiment, in another embodiment of the present application, generating a camera movement curve from the current position to the target position according to the target position and the current position in S301 includes:
[0083] According to the target position and current position, the camera movement curve is generated using the preset spline curve function.
[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 the shortest distance curve that ensures that there are no obstructions, 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 user's visual experience.
[0085] In summary, in this embodiment, a camera movement curve is generated according to the target position and the current position using a preset spline curve function, so that the movement of the virtual camera does not affect the user's visual experience.
[0086] In the above Figure 3 On the basis of the corresponding embodiment, in another embodiment of the present application, controlling the virtual camera in the virtual display scene in S302 to move from the current position to the target position along the camera movement curve includes:
[0087] According to the preset movement time interval, each position on the camera movement 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 movement time interval, each position on the camera movement curve is read frame by frame, and the virtual camera is moved at a constant speed along the camera movement curve, so that the user can still see the target virtual model during the movement of the virtual camera.
[0089] In summary, in this embodiment, each position on the camera movement curve is read according to the preset movement time interval, and the virtual camera in the virtual display scene is controlled to move from the current position to each position in sequence. Thus, the virtual camera is moved at a constant speed along the camera movement curve, so that the user can still see the target virtual model during the movement of the virtual camera.
[0090] In the above Figure 3 On the basis of the corresponding embodiment, the embodiment of the present application further provides a method for displaying a second display model. Figure 4 A flow chart of a method for displaying a second display model provided in an embodiment of the present application. Figure 4 As shown, in S303, the first display model is updated to the display models of various positions in sequence until it is updated and displayed as the second display model, including:
[0091] S401: Determine whether the display model and the second display model at each position exceed a preset display range of the virtual display scene.
[0092] After the position of the virtual camera is switched, it is possible that the display model and the second display model at each position exceed the preset display range of the virtual display scene, which will cause the user to be unable to 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 it is updated and displayed as the second display model.
[0094] If the display model at each position and the second display model do not exceed the preset display range, it means 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 it is updated and displayed as the second display model.
[0095] In summary, in this embodiment, it is determined whether the display model and the second display model at each position exceed the preset display range of the virtual display scene; if the display model and the second display model at each position do not exceed the preset display range, the first display model is sequentially updated to the display model at each position until it is updated and displayed as the second display model. Thus, it is ensured that the user can view the complete target virtual model at any time.
[0096] In the above Figure 4 On the basis of the corresponding embodiment, in another embodiment of the present application, in S402, the first display model is updated to display models at various positions in sequence until it is updated and displayed as the second display model, including:
[0097] If the display model and the second display model at each position 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 or the second display model at each position exceeds the preset display range, the display model or the second display model is scaled until the display model or the second display model at each position does not exceed the preset display range, so that the user can view the complete target virtual model.
[0099] In summary, in this embodiment, if the display model and the second display model at each position exceed the preset display range, the target display model exceeding the preset display range is scaled and the scaled target display model is displayed, thereby ensuring that the user can view the complete target virtual model at any time.
[0100] The following is a description of a virtual model display device, equipment, storage medium and program provided by the present application for execution. The specific implementation process and technical effects are described above and will not be repeated below.
[0101] Figure 5 A schematic diagram of a virtual model display device provided in an embodiment of the present application, wherein a graphical user interface is provided through a terminal device, and the graphical user interface includes: a virtual display scene, wherein the virtual display scene has a target virtual model; Figure 5 As shown, the device comprises:
[0102] A display module 501 is used to display a first display model of a target virtual model in a virtual display scene, where 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 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 a second display model of the target virtual model, where the second display model is a display model obtained by capturing the target virtual model at the target position by the virtual camera;
[0104] The updating module 503 is used to update and display the first display model in the virtual display scene into a second display model.
[0105] Furthermore, the display module 501 is further configured to calculate 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; and scale the target virtual model according to the scaling ratio.
[0106] Furthermore, the display module 501 is specifically configured to calculate a scaling ratio according to a size of a preset reference model on a preset reference plane and an original size of the target virtual model on the preset reference plane.
[0107] Furthermore, the display module 501 is further configured to scale the virtual reference object according to a scaling ratio.
[0108] Further, the switching module 502 is also used to determine that the display trigger operation of the target part of the input target virtual model is a display switching operation, and the target position is the camera position corresponding to the preset mounting point on the target part; or, determine that the display trigger operation of the target subject of the input target virtual model is a display switching operation, and the target position is the preset camera position corresponding to the target subject; or, determine that the preset camera position selection trigger operation in the input virtual display scene is a display switching operation, and the target position is the preset camera position selected by the preset camera position selection trigger operation; or, determine that the perspective switching trigger operation of the input target virtual model is a display switching operation, and the target position is the camera position after the perspective switching trigger operation is switched; or, determine that the zoom trigger operation of the input target virtual model is a display switching operation, and the target position is the camera position corresponding to the zoom trigger operation.
[0109] Furthermore, the switching module 502 is specifically used 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 obtain the display model of each position on the camera movement curve until the second display model is obtained; and update the first display model to the display model of each position in turn until it is updated and displayed as the second display model.
[0110] Furthermore, the switching module 502 is specifically configured to generate a camera movement curve according to the target position and the current position by using a preset spline curve function.
[0111] Furthermore, 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 the current position to each position in sequence.
[0112] Furthermore, the switching module 502 is specifically used to determine whether the display model and the second display model at each position exceed the preset display range of the virtual display scene; if the display model and the second display model at each position do not exceed the preset display range, the first display model is updated to the display model of each position in sequence until it is updated and displayed as the second display model.
[0113] Furthermore, the switching module 502 is specifically configured to scale the target display model that exceeds the preset display range if the display model and the second display model at each position exceed the preset display range, and display the scaled target display model.
[0114] Through the above method, a first display model of the target virtual model is displayed in the virtual display scene, and the first display model is the 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 the second display model of the target virtual model is obtained, and the second display model is the display model captured by the virtual camera at the target position; the first display model in the virtual display scene is updated and displayed as the second display model. Thus, the virtual camera adapts to different parts of the target virtual model and automatically displays the target virtual model at different angles, so that the user can view different parts of the target virtual model in a timely and accurate manner without the user having to manually move the virtual camera, thereby improving the user experience.
[0115] Figure 6 A structural diagram of an electronic device provided in 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 communicates with the storage medium 602 via the bus 603, and the processor 601 executes the machine-readable instructions to execute the above method.
[0116] Displaying a first display model of the target virtual model in the virtual display scene, where the first display model is a display model captured by a virtual camera at a current position of the target virtual model;
[0117] 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, where the second display model is a display model obtained by capturing the target virtual model at the target position by the virtual camera;
[0118] The first presentation model in the virtual presentation scene is updated and displayed as a second presentation model.
[0119] Optionally, before displaying the first presentation model of the target virtual model in the virtual presentation scene, the method further includes:
[0120] 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;
[0121] The target virtual model is scaled according to the scaling ratio.
[0122] Optionally, calculating the scaling ratio of the target virtual model according to the size of the preset reference model and the original size of the target virtual model includes:
[0123] The scaling ratio is calculated 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.
[0124] Optionally, 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:
[0125] The virtual reference object is scaled according to the zoom ratio.
[0126] Optionally, in response to the input display switching operation, before 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:
[0127] Determine that the display trigger operation of the target part of the input target virtual model is a display switching operation, and the target position is a camera position corresponding to a preset mounting point on the target part; or,
[0128] Determine that the display triggering operation of the target subject of the input target virtual model is a display switching operation, and the target position is a preset camera position corresponding to the target subject; or,
[0129] Determine that the trigger operation selected by the preset camera position in the input virtual display scene is a display switching operation, and the target position is the preset camera position selected by the trigger operation selected by the preset camera position; or,
[0130] Determine that the perspective switching trigger operation of the input target virtual model is a display switching operation, and the target position is the camera position after the perspective switching trigger operation is switched; or,
[0131] It is determined that the zoom trigger operation of the input target virtual model is a display switching operation, and the target position is a camera position corresponding to the zoom trigger operation.
[0132] Optionally, controlling the virtual camera to move from a current position to a target position corresponding to the display switching operation and acquiring a second display model of the target virtual model includes:
[0133] Generate a camera movement curve from the current position to the target position according to the target position and the current position;
[0134] Controlling a virtual camera in a virtual display scene to move from a current position to a target position along a camera movement curve, and obtaining display models of various positions on the camera movement curve until a second display model is obtained;
[0135] Updating and displaying the first display model in the virtual display scene as the second display model includes:
[0136] The first display model is updated to the display models at each position in sequence until it is updated and displayed as the second display model.
[0137] Optionally, generating a camera movement curve from the current position to the target position according to the target position and the current position includes:
[0138] According to the target position and current position, the camera movement curve is generated using the preset spline curve function.
[0139] Optionally, controlling a virtual camera in the virtual display scene to move from a current position to a target position along a camera movement curve includes:
[0140] According to the preset movement time interval, each position on the camera movement 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.
[0141] Optionally, updating the first display model to display models at various positions in sequence until the first display model is updated and displayed as the second display model includes:
[0142] Determining whether the display model and the second display model at each position exceed a preset display range of the virtual display scene;
[0143] 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 it is updated and displayed as the second display model.
[0144] Optionally, updating the first display model to display models at various positions in sequence until the first display model is updated and displayed as the second display model includes:
[0145] If the display model and the second display model at each position 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] Through the above method, a first display model of the target virtual model is displayed in the virtual display scene, and the first display model is the 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 the second display model of the target virtual model is obtained, and the second display model is the display model captured by the virtual camera at the target position; the first display model in the virtual display scene is updated and displayed as the second display model. Thus, the virtual camera adapts to different parts of the target virtual model and automatically displays the target virtual model at different angles, so that the user can view different parts of the target virtual model in a timely and accurate manner without the user having to manually move the virtual camera, thereby improving the user experience.
[0147] The embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the above method embodiment is executed.
[0148] Displaying a first display model of the target virtual model in the virtual display scene, where the first display model is a display model captured by a virtual camera at a current position of 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 a second display model of the target virtual model is obtained, where the second display model is a display model obtained by capturing the target virtual model at the target position by the virtual camera;
[0150] The first presentation model in the virtual presentation scene is updated and displayed as a second presentation model.
[0151] Optionally, before displaying the first presentation model of the target virtual model in the virtual presentation scene, the method further includes:
[0152] 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;
[0153] The target virtual model is scaled according to the scaling ratio.
[0154] Optionally, calculating the scaling ratio of the target virtual model according to the size of the preset reference model and the original size of the target virtual model includes:
[0155] The scaling ratio is calculated 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.
[0156] Optionally, 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:
[0157] The virtual reference object is scaled according to the zoom ratio.
[0158] Optionally, in response to the input display switching operation, before 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:
[0159] Determine that the display trigger operation of the target part of the input target virtual model is a display switching operation, and the target position is a camera position corresponding to a preset mounting point on the target part; or,
[0160] Determine that the display triggering operation of the target subject of the input target virtual model is a display switching operation, and the target position is a preset camera position corresponding to the target subject; or,
[0161] Determine that the trigger operation selected by the preset camera position in the input virtual display scene is a display switching operation, and the target position is the preset camera position selected by the trigger operation selected by the preset camera position; or,
[0162] Determine that the perspective switching trigger operation of the input target virtual model is a display switching operation, and the target position is the camera position after the perspective switching trigger operation is switched; or,
[0163] It is determined that the zoom trigger operation of the input target virtual model is a display switching operation, and the target position is a camera position corresponding to the zoom trigger operation.
[0164] Optionally, controlling the virtual camera to move from a current position to a target position corresponding to the display switching operation and acquiring a second display model of the target virtual model includes:
[0165] Generate a camera movement curve from the current position to the target position according to the target position and the current position;
[0166] Controlling a virtual camera in a virtual display scene to move from a current position to a target position along a camera movement curve, and obtaining display models of various positions on the camera movement curve until a second display model is obtained;
[0167] Updating and displaying the first display model in the virtual display scene as the second display model includes:
[0168] The first display model is updated to the display models at each position in sequence until it is updated and displayed as the second display model.
[0169] Optionally, generating a camera movement curve from the current position to the target position according to the target position and the current position includes:
[0170] According to the target position and current position, the camera movement curve is generated using the preset spline curve function.
[0171] Optionally, controlling a virtual camera in the virtual display scene to move from a current position to a target position along a camera movement curve includes:
[0172] According to the preset movement time interval, each position on the camera movement 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.
[0173] Optionally, updating the first display model to display models at various positions in sequence until the first display model is updated and displayed as the second display model includes:
[0174] Determining whether the display model and the second display model at each position exceed a preset display range of the virtual display scene;
[0175] 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 it is updated and displayed as the second display model.
[0176] Optionally, updating the first display model to display models at various positions in sequence until the first display model is updated and displayed as the second display model includes:
[0177] If the display model and the second display model at each position exceed the preset display range, the target display model exceeding the preset display range is scaled, and the scaled target display model is displayed.
[0178] Through the above method, a first display model of the target virtual model is displayed in the virtual display scene, and the first display model is the 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 the second display model of the target virtual model is obtained, and the second display model is the display model captured by the virtual camera at the target position; the first display model in the virtual display scene is updated and displayed as the second display model. Thus, the virtual camera adapts to different parts of the target virtual model and automatically displays the target virtual model at different angles, so that the user can view different parts of the target virtual model in a timely and accurate manner without the user having to manually move the virtual camera, thereby improving the user experience.
[0179] In the embodiment of the present application, the computer program can also execute other machine-readable instructions when run by the processor to execute other methods described in the embodiment. For the specific execution method steps and principles, please refer to the description of the embodiment, which will not be repeated here.
[0180] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.
[0181] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0182] In addition, each functional unit in the embodiments provided in the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0183] If the functions are implemented in the form of 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 the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0184] It should be noted that similar numbers and letters represent similar items in the following figures. 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 only used to distinguish the description and are not to be understood as indicating or implying relative importance.
[0185] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present application, which are used to illustrate the technical solutions of the present application, rather than to limit them. The protection scope of the present application is not limited thereto. Although the present application is described in detail with reference to the above-mentioned embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-mentioned embodiments within the technical scope disclosed in the present application, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application. They should all be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.
Claims
1. A virtual model display method, characterized in that: Providing a graphical user interface through a terminal device, the graphical user interface includes: a virtual display scene, and the virtual display scene has a target virtual model; the method includes: Displaying a first display model of the target virtual model in the virtual display scene, where the first display model is a display model captured by a virtual camera at a current position of the target virtual model; In response 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 a second display model of the target virtual model, where the second display model is a display model obtained by capturing the target virtual model at the target position by the virtual camera; The first presentation model in the virtual presentation scene is updated and displayed as the second presentation model.
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: 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; 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 according to the size of the preset reference model and the original size of the target virtual model comprises: The scaling ratio is calculated 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.
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 the display switching operation in response to the input controls the virtual camera to move from the current position to the target position corresponding to the display switching operation and obtains the second display model of the target virtual model, the method further includes: 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 the camera position corresponding to the preset mounting point on the target part; or Determine that the input display trigger operation of the target subject of the target virtual model is the display switching operation, and the target position is a preset camera position corresponding to the target subject; or Determine that the preset camera position selection trigger operation input in the virtual display scene is the display switching operation, and the target position is the preset camera position selected by the preset camera position selection trigger operation; or, Determine that the input perspective switching trigger operation of the target virtual model is the display switching operation, and the target position is the camera position after the perspective switching trigger operation is switched; or, It is determined that the input zoom trigger operation of the target virtual model is the display switching operation, and the target position is the camera position corresponding to the zoom trigger operation.
6. The method according to claim 1, characterized in that The controlling the virtual camera to move from the current position to the target position corresponding to the display switching operation and obtaining a second display model of the target virtual model includes: generating a camera movement curve from the current position to the target position according to the target position and the current position; Controlling the virtual camera in the virtual display scene to move from the current position to the target position along the camera movement curve, and obtaining the display model of each position on the camera movement curve until the second display model is obtained; The updating and displaying the first display model in the virtual display scene as the second display model includes: The first display model is updated to the display models at the respective positions in sequence until it is updated and displayed as the second display model.
7. The method according to claim 6, characterized in that The step of generating a camera movement curve from the current position to the target position according to the target position and the current position includes: The camera movement curve is generated according to the target position and the current position using a preset spline curve function.
8. The method according to claim 6, characterized in that The controlling the virtual camera in the virtual display scene to move from the current position to the target position along the camera movement curve comprises: According to a preset movement time interval, each position on the camera movement 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.
9. The method according to claim 6, characterized in that The updating of the first display model to the display models at the respective positions in sequence until the display is updated to be the second display model includes: Determining whether the display models at each position and the second display model exceed a preset display range of the virtual display scene; 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 updated to the display models at the various positions in sequence until the first display model is updated and displayed as the second display model.
10. The method according to claim 9, characterized in that The updating of the first display model to the display models at the respective positions in sequence until the display is updated to be the second display model includes: If the display models at 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.
11. A virtual model display device, characterized in that: A graphical user interface is provided through a terminal device, wherein the graphical user interface includes: a virtual display scene, wherein the virtual display scene has a target virtual model; and the device includes: A display module, configured to display a first display model of the target virtual model in the virtual display scene, wherein the first display model is a display model captured by a virtual camera at a current position of the target virtual model; a switching module, configured to respond 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 obtain a second display model of the target virtual model, where the second display model is a display model obtained by capturing the target virtual model at the target position by the virtual camera; An updating module is used to update and display the first display model in the virtual display scene to the second display model.
12. An electronic device, characterized in that: include: 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 and the storage medium communicate via the bus, and the processor executes the machine-readable instructions to perform the steps of the model display method as described in any one of claims 1 to 10.
13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the model display method according to any one of claims 1 to 10 are executed.
14. A computer program instruction, characterized in that: When the program instructions are executed by a processor, the steps of the model display method as described in any one of claims 1 to 10 are implemented.
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
Virtual character generation method and device
CN115719392A
Virtual model processing method and device and electronic equipment
CN118505946A
Display control method and device for virtual object, and storage medium and electronic device
WO2023236602A1
Cited By
3D stereoscopic vision multi-normal-form visual angle control method and visual angle control system
CN122069339A