Display processing method for three-dimensional vehicle model
By displaying the three-dimensional vehicle model in the user interface and using two-dimensional controls to follow its changes, the problem of high rendering of the three-dimensional vehicle model is solved, and performance improvement and mode penetration are achieved.
Patent Information
- Application Number
- CN202410839759.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-26
- Publication Date
- 2025-06-24
- Estimated Expiration
- 2044-06-26
AI Technical Summary
In the prior art, the rendering of the three-dimensional vehicle model is large, resulting in a degradation of performance.
By displaying the 3D vehicle model in the user interface and adjusting its display content when obtaining interactive operation instructions, using two-dimensional controls to follow the changes in the 3D vehicle model, reducing unnecessary rendering using different rendering levels.
It effectively reduces rendering consumption, improves performance, and avoids the possible mode penetration of three-dimensional controls.
Smart Images

Figure CN118823233B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the technical field of automobiles, and particularly to a display processing method for a three-dimensional vehicle model. Background Art
[0002] With the continuous development of science and technology, the display methods of vehicles are also changing. For example, vehicles can be displayed through three-dimensional animations. Among them, the production of three-dimensional animations takes technologies such as three-dimensional modeling as the core, and three-dimensional modeling is to draw the appearance and internal structure of a vehicle with the help of three-dimensional modeling software to create a three-dimensional vehicle model. In addition, when performing three-dimensional modeling of a vehicle, controls corresponding to vehicle components such as doors, windows, and trunks can also be created, and the control of the corresponding vehicle components can be achieved through virtual interaction with the controls. For example, when wanting to open the trunk, click on the control for controlling the trunk on the in-vehicle screen to open the trunk.
[0003] In the related art, the controls are usually three-dimensional controls. When displaying a three-dimensional vehicle model, the three-dimensional controls can change following the movement of the three-dimensional vehicle model, but there is a problem of relatively large rendering consumption. Summary of the Invention
[0004] The embodiments of the present invention provide a display processing method for a three-dimensional vehicle model to solve the problem of relatively large rendering consumption in the related art.
[0005] According to one aspect of the embodiments of the present invention, a display processing method for a three-dimensional vehicle model is provided, including:
[0006] Displaying a three-dimensional vehicle model on a user interface;
[0007] When an interaction operation instruction for the three-dimensional vehicle model is obtained, adjusting the display content of the three-dimensional vehicle model in the user interface according to the interaction operation instruction, and
[0008] During the adjustment process, the display content of at least one two-dimensional control corresponding to the three-dimensional vehicle model on the user interface follows the adjustment of the three-dimensional vehicle model.
[0009] According to another aspect of the embodiments of the present invention, a display processing device for a three-dimensional vehicle model is provided, including:
[0010] A display module for displaying a three-dimensional vehicle model on a user interface;
[0011] A processing module for, when an interaction operation instruction for the three-dimensional vehicle model is obtained, adjusting the display content of the three-dimensional vehicle model in the user interface according to the interaction operation instruction, and
[0012] During the adjustment process, the display content of at least one two-dimensional control corresponding to the three-dimensional vehicle model on the user interface follows the adjustment of the three-dimensional vehicle model.
[0013] According to another aspect of the embodiments of the present invention, there is provided an electronic device, including:
[0014] The memory stores computer-executable instructions;
[0015] The processor executes the computer-executable instructions stored in the memory, so that the processor executes the method as described in the first aspect.
[0016] According to still another aspect of the embodiments of the present invention, there is provided a computer-readable storage medium, in which at least one executable instruction is stored, and the executable instruction causes an electronic device / device to perform the operations of the method as described in the first aspect.
[0017] According to still another aspect of the embodiments of the present invention, there is provided a computer program product, and when the computer program is executed by a processor, the method as described in the first aspect is implemented.
[0018] The present invention displays a three-dimensional vehicle model on a user interface, and the user interacts with the three-dimensional vehicle model. When an interaction operation instruction for the three-dimensional vehicle model is obtained, the display content of the three-dimensional vehicle model in the user interface is adjusted according to the interaction operation instruction. And during the adjustment process, the display content of at least one two-dimensional control corresponding to the three-dimensional vehicle model on the user interface follows the adjustment of the three-dimensional vehicle model. Compared with the three-dimensional controls in the prior art, using two-dimensional controls to change with the change of the three-dimensional vehicle model, since three-dimensional rendering and two-dimensional rendering process different rendering levels, it can effectively reduce unnecessary rendering, reduce rendering consumption, and effectively improve performance.
[0019] The above description is only an overview of the technical solutions of the embodiments of the present invention. In order to be able to understand the technical means of the embodiments of the present invention more clearly, it can be implemented according to the content of the specification. And in order to make the above and other purposes, features and advantages of the embodiments of the present invention more obvious and understandable, the following specifically describes the embodiments of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] The drawings are only used to illustrate the embodiments and are not considered to be a limitation of the present invention. And throughout the drawings, the same reference numerals are used to represent the same components. In the drawings:
[0021] Figure 1 A flowchart showing an embodiment of the display processing method of the three-dimensional vehicle model provided by the present invention is shown;
[0022] Figure 2Shows a schematic diagram of a perspective view of the three-dimensional vehicle model provided by the present invention;
[0023] Figure 3 Shows a schematic flowchart of another embodiment of the display processing method of the three-dimensional vehicle model provided by the present invention;
[0024] Figure 4 Shows a schematic diagram of another perspective view of the three-dimensional vehicle model provided by the present invention;
[0025] Figure 5 Shows a schematic diagram of the penetration phenomenon of the three-dimensional vehicle model;
[0026] Figure 6 Shows a schematic diagram of a three-dimensional object and a two-dimensional object;
[0027] Figure 7 Shows a schematic coordinate diagram;
[0028] Figure 8 Shows a schematic diagram of the frustum range corresponding to the virtual camera provided by the present invention;
[0029] Figure 9 Shows a schematic diagram of the frustum part of the virtual camera provided by the present invention;
[0030] Figure 10 Shows a schematic diagram of the positional relationship between an object and a virtual camera;
[0031] Figure 11 Shows a schematic diagram of the positional relationship between the visible vehicle components provided by the present invention and a virtual camera;
[0032] Figure 12 Shows a schematic structural diagram of an embodiment of the display processing device of the three-dimensional vehicle model provided by the present invention;
[0033] Figure 13 Shows a schematic structural diagram of an embodiment of the electronic device provided by the present invention;
[0034] Figure 14 Shows a schematic diagram of the physical structure of a controller provided by the present invention. Detailed implementation manners
[0035] The exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present invention are shown in the drawings, it should be understood that the present invention can be implemented in various forms and should not be limited by the embodiments set forth herein.
[0036] Figure 1 Shows a flowchart of an embodiment of the display processing method of the three-dimensional vehicle model provided by the present invention, which is executed by an electronic device. As Figure 1As shown, the method includes the following steps:
[0037] Step 101, display a three-dimensional vehicle model on the user interface.
[0038] In this embodiment, a three-dimensional vehicle model is displayed on the user interface. For example, a three-dimensional vehicle model is displayed on the user interface of the in-vehicle display screen of the vehicle. The user interacts with the three-dimensional vehicle model. For example, the position, angle, and size of the three-dimensional vehicle model are adjusted. The user slides the three-dimensional vehicle model displayed on the user interface to make the front of the vehicle face the user; or, the displayed three-dimensional vehicle model is scaled to scale the three-dimensional vehicle model. Refer to Figure 2 , the three-dimensional vehicle model includes multiple components, such as doors, windows, charging ports, engine hoods, trunks, and wheels.
[0039] Step 102, when an interaction operation instruction for the three-dimensional vehicle model is obtained, adjust the display content of the three-dimensional vehicle model on the user interface according to the interaction operation instruction. And, during the adjustment process, the display content of at least one two-dimensional control corresponding to the three-dimensional vehicle model on the user interface follows the adjustment of the three-dimensional vehicle model.
[0040] Refer to Figure 2 , from the user's perspective, in the display interface, the left front door, left rear door, left front wheel, left rear wheel, left front window, left rear window, engine hood, and charging port in the three-dimensional vehicle model can be seen, and these components are not blocked. However, the right front door, right rear door, right front wheel, right rear wheel, right front window, right rear window, and trunk in the three-dimensional vehicle model are blocked and cannot be seen from the user's perspective. The user can only see these components by adjusting the position or angle of the three-dimensional vehicle model through interaction with the three-dimensional vehicle model. When an interaction operation instruction for the three-dimensional vehicle model is obtained, the display content of the three-dimensional vehicle model in the display interface is adjusted according to the interaction instruction. The display content is actually the visible vehicle components of the three-dimensional vehicle model from the user's perspective. When the angle, position, or size of the three-dimensional vehicle model is adjusted, the display content will also be adjusted accordingly.
[0041] Specifically, two-dimensional controls are set on the three-dimensional vehicle model. Generally, the two-dimensional controls are set on the components of the three-dimensional vehicle model, such as Figure 2 as shown, two-dimensional controls are displayed at the corresponding positions of the left front door, left rear door, and charging port. Figure 2The two-dimensional controls of some components are not drawn, including: the engine hood, the left front window, the left rear window, etc. By clicking on the two-dimensional control, the vehicle entity associated with the two-dimensional control can be opened or closed. During the above adjustment process, the display content of at least one two-dimensional control corresponding to the three-dimensional vehicle model on the user interface follows the adjustment of the three-dimensional vehicle model. It can be an adjustment of the display size and / or display position of the two-dimensional control on the user interface. The three-dimensional vehicle model and the two-dimensional control are on different rendering levels. The three-dimensional vehicle model is rendered and displayed on one rendering level, and the two-dimensional control is rendered and displayed on another rendering level.
[0042] In the present invention, a three-dimensional vehicle model is displayed on the user interface, and the user interacts with the three-dimensional vehicle model. When an interaction operation instruction for the three-dimensional vehicle model is obtained, the display content of the three-dimensional vehicle model in the user interface is adjusted according to the interaction operation instruction. And during the adjustment process, the display content of at least one two-dimensional control corresponding to the three-dimensional vehicle model on the user interface follows the adjustment of the three-dimensional vehicle model. Compared with the three-dimensional controls in the prior art, using two-dimensional controls that change with the change of the three-dimensional vehicle model, since three-dimensional rendering and two-dimensional rendering process different rendering levels, it can effectively reduce unnecessary rendering, reduce rendering consumption, and effectively improve performance.
[0043] Figure 3 The flowchart of another embodiment of the display processing method of the three-dimensional vehicle model provided by the present invention is shown. This method is executed by an electronic device. As Figure 3 shown, the method includes the following steps:
[0044] Step 301, display a three-dimensional vehicle model on the user interface.
[0045] Among them, the implementation principle and technical effect of step 301 can be referred to the foregoing embodiments and will not be elaborated here.
[0046] Step 302a, open or close the vehicle entity associated with the three-dimensional vehicle model;
[0047] Or, step 302b, receive an interaction operation acting on the two-dimensional control;
[0048] Or, step 302c, receive an interaction operation acting on the three-dimensional vehicle model.
[0049] In this embodiment, an interaction operation instruction is generated through multiple methods. Specifically, when the user opens or closes the door, that is, opens or closes the vehicle entity associated with the three-dimensional vehicle model, an interaction operation instruction is generated, and the step of adjusting the display content of the three-dimensional vehicle model in the user interface according to the interaction operation instruction when an interaction operation instruction for the three-dimensional vehicle model is obtained is executed.
[0050] Alternatively, the user clicks on a two-dimensional control of the three-dimensional vehicle model in the user interface, triggering the generation of an interactive operation instruction, and performs the step of adjusting the display content of the three-dimensional vehicle model in the user interface according to the interactive operation instruction when the interactive operation instruction for the three-dimensional vehicle model is obtained. At the same time, the vehicle entity corresponding to the two-dimensional control of the user interaction is turned on or off. If the vehicle entity corresponding to the two-dimensional control is in the on state and an interactive operation acting on the two-dimensional control is received, the corresponding vehicle entity is turned off; if the vehicle entity corresponding to the two-dimensional control is in the off state and an interactive operation acting on the two-dimensional control is received, the corresponding vehicle entity is turned on.
[0051] Alternatively, the user interacts with the three-dimensional vehicle model in the user interface. For example, the user zooms in or out, moves, or rotates the three-dimensional vehicle model in the user interface, triggering the generation of an interactive operation instruction for the three-dimensional vehicle model, and performs the step of adjusting the display content of the three-dimensional vehicle model in the user interface according to the interactive operation instruction when the interactive operation instruction for the three-dimensional vehicle model is obtained.
[0052] Step 303: When an interactive operation instruction for the three-dimensional vehicle model is obtained, adjust the display content of the three-dimensional vehicle model in the user interface according to the interactive operation instruction. Moreover, during the adjustment process, the display content of at least one two-dimensional control corresponding to the three-dimensional vehicle model on the user interface follows the adjustment of the three-dimensional vehicle model.
[0053] Among them, the implementation principle and technical effects of step 303 can be referred to the foregoing embodiments and will not be elaborated herein.
[0054] In a possible implementation manner, the display content of the two-dimensional control on the user interface follows the adjustment of the three-dimensional vehicle model, including:
[0055] The display position of the two-dimensional control on the user interface follows the adjustment of the three-dimensional vehicle model; and / or, the display size of the two-dimensional control on the user interface follows the adjustment of the three-dimensional vehicle model.
[0056] In this embodiment, in order for the user to more intuitively view which vehicle entity the two-dimensional control is used to control, the display position of the two-dimensional control on the user interface follows the adjustment of the three-dimensional vehicle model. During the movement of the three-dimensional vehicle model, the display position of the corresponding two-dimensional control changes following the movement of the three-dimensional vehicle model. In order to better display the two-dimensional control, the display size of the two-dimensional control on the user interface follows the adjustment of the three-dimensional vehicle model. From the user's perspective, the display sizes of the two-dimensional controls on the user interface are inconsistent. For example, when the front of the vehicle faces the user, the two-dimensional control closer to the front of the vehicle has a relatively larger display size compared to the two-dimensional control closer to the rear of the vehicle, presenting a perspective experience of objects being larger when closer and smaller when farther away, enhancing the user experience.
[0057] In a possible implementation, the display position of the two-dimensional control on the user interface is located on the vehicle component associated with the two-dimensional control; the display position of the two-dimensional control on the user interface is adjusted following the three-dimensional vehicle model, including:
[0058] The display position of the two-dimensional control on the user interface moves following the associated vehicle component.
[0059] Continue to refer to Figure 2 , from the user's perspective, the vehicle components include the engine hood, the left front door, the left rear door, and the charging port. The above vehicle components are in one-to-one correspondence and association with their respective two-dimensional controls. The two-dimensional controls are used to control the opening or closing of the associated vehicle entity. The display position of each two-dimensional control on the user interface is located on the vehicle component associated with the two-dimensional control. During the adjustment process, the display position of the two-dimensional control on the user interface moves following the associated vehicle component. The user can more intuitively understand the associated object of each two-dimensional control, which is convenient for the user to use. Moreover, the rendering levels of the two-dimensional and three-dimensional are different. The biggest difference between the two-dimensional and three-dimensional is the perspective. The three-dimensional rendering brings a more comprehensive visual effect. While not changing the perspective effect of the three-dimensional vehicle model, combining the three-dimensional vehicle model and the two-dimensional control, and displaying the corresponding two-dimensional control at an appropriate position of the three-dimensional vehicle model will not affect the user's use, and can effectively reduce unnecessary rendering and reduce the rendering consumption.
[0060] Optionally, the two-dimensional control is pre-associated with its corresponding vehicle component and in one-to-one correspondence. For example, Figure 2 shown, taking the two-dimensional control of the charging port and the two-dimensional control of the left door as examples. Among them, the two-dimensional control of the charging port is associated with the charging port. This two-dimensional control is used to control the opening or closing of the associated vehicle entity, that is, the vehicle charging port. The display position of the two-dimensional control of the charging port on the user interface is located at the charging port associated with the two-dimensional control of the charging port of the three-dimensional vehicle model; the two-dimensional control of the left door is associated with the left door. This two-dimensional control is used to control the opening or closing of the associated vehicle entity, that is, the left door of the vehicle. The display position of the two-dimensional control of the left door on the user interface is located at the left door associated with the two-dimensional control of the left door of the three-dimensional vehicle model.
[0061] In a possible implementation, the display position of the two-dimensional control on the user interface is located on the vehicle component associated with the two-dimensional control; the display size of the two-dimensional control on the user interface is adjusted following the three-dimensional vehicle model, including:
[0062] The display size of the two-dimensional control on the user interface changes following the size of the three-dimensional vehicle model, where the size is positively correlated with the display size.
[0063] In this embodiment, the vehicle components are in one-to-one correspondence and association with their respective two-dimensional controls. The display positions of the two-dimensional controls on the user interface are located on the vehicle components associated with the two-dimensional controls. During the adjustment process, the display size of the two-dimensional controls on the user interface changes following the size of the three-dimensional vehicle model. The larger the size of the three-dimensional vehicle model, the larger the display size of the corresponding two-dimensional control on the user interface. On the contrary, the smaller the size of the three-dimensional vehicle model, the smaller the display size of the corresponding two-dimensional control on the user interface. The size and the display size are positively correlated. Refer to Figure 2 and Figure 4 , Figure 4 the two-dimensional control of the charging port in Figure 2 has a larger display size than the two-dimensional control of the charging port in Figure 2 . This is because from the user's perspective, Figure 4 the rear end of the three-dimensional vehicle model in
[0064] is smaller in size than the front end, the charging port is relatively farther from the user, and the display size of the charging port also becomes smaller accordingly.
[0065] In
[0066] a possible implementation manner, adjusting the display content of the three-dimensional vehicle model in the user interface according to the interaction operation instruction includes:
[0065] If the interaction operation instruction is an opening instruction for a target vehicle component on the three-dimensional vehicle model, play an animation of opening the target vehicle component in the user interface; if the interaction operation instruction is a closing instruction for a target vehicle component on the three-dimensional vehicle model, play an animation of closing the target vehicle component in the user interface.
[0066] In this embodiment, if the user clicks on a certain two-dimensional control, the vehicle component corresponding to the clicked two-dimensional control is the target vehicle component. If the target vehicle component is in the closed state, it means that the corresponding vehicle entity is also in the closed state, and the state of the vehicle entity is consistent with that of the target component. Clicking on this two-dimensional control triggers an opening instruction. If the interaction operation instruction is an opening instruction for the target component on the three-dimensional vehicle model, play an animation of opening the target vehicle component in the user interface and control the vehicle entity corresponding to the target component to open; if the target vehicle component is in the open state, it means that the corresponding entity is also in the open state. Clicking on this two-dimensional control triggers a closing instruction. If the interaction operation instruction is a closing instruction for the target vehicle component on the three-dimensional vehicle model, then play an animation of closing the target vehicle component in the user interface and control the vehicle entity corresponding to the target component to close. During the opening or closing process of the target vehicle component, the display content of the two-dimensional control on the target vehicle component on the user interface adjusts following the target vehicle component.
[0067] It should be noted that if a three-dimensional vehicle model is directly combined with a two-dimensional control, there may be a situation of model penetration between the three-dimensional vehicle model and the two-dimensional control. For example, model penetration occurs when a component changes from a closed state to an open state. Refer to Figure 5 , the left rear door of the three-dimensional vehicle model penetrates its corresponding two-dimensional control. During the opening process, the position of the left rear door changes, while the position of the two-dimensional control is fixed. Therefore, model penetration occurs, and the two-dimensional control is not completely displayed after penetration, which is not conducive to user clicking and also affects the vehicle display effect. In the present invention, a method of combining a two-dimensional control with a three-mode vehicle model and moving the two-dimensional control along with the three-dimensional vehicle model is adopted. The display content of the two-dimensional control on the user interface is adjusted along with the three-dimensional vehicle model, that is, the two-dimensional control moves along with the transformation of the three-dimensional vehicle model and will not penetrate each other. Using the two-dimensional control to move along with the three-dimensional vehicle model can effectively avoid the occurrence of model penetration, does not affect the display effect of the three-dimensional vehicle model, and is also convenient for users to use. At the same time, the two-dimensional control follows the principle of objects being larger when closer and smaller when farther away, which can enhance the user experience.
[0068] Regarding the description of the rendering level, as Figure 6 shown, the two-dimensional object 602 is displayed covering the three-dimensional object 601. The three-dimensional object 601 corresponds to the first rendering level, and the two-dimensional object 602 corresponds to the second rendering level. Two-dimensional rendering and three-dimensional rendering are at two different rendering levels, and the second rendering level is above the first rendering level. Specifically, according to the position information of the visible vehicle components of the three-dimensional vehicle model, the three-dimensional vehicle model is rendered and displayed at the first rendering level. For the two-dimensional controls existing on the visible components, the two-dimensional controls on the visible components are rendered and displayed at the second rendering level, which can effectively reduce unnecessary rendering and reduce rendering consumption.
[0069] In a possible implementation manner, adjusting the display content of the three-dimensional vehicle model in the user interface according to the interaction operation instruction includes:
[0070] If the interaction operation instruction is a scaling instruction for the three-dimensional vehicle model, based on the scaling instruction, the three-dimensional vehicle model is scaled in the user interface; if the interaction operation instruction is a position adjustment instruction for the three-dimensional vehicle model, based on the position adjustment instruction, the display position of the three-dimensional vehicle model is adjusted in the user interface; if the interaction operation instruction is an angle adjustment instruction for the three-dimensional vehicle model, based on the angle adjustment instruction, the display angle of the three-dimensional vehicle model is adjusted and displayed in the user interface.
[0071] In this embodiment, the interaction operation instructions are divided into a scaling instruction and an adjustment instruction. The adjustment instruction is further divided into an adjustment instruction for the position of the three-dimensional vehicle model and an adjustment instruction for the angle. Based on the different interaction instructions, the content to be adjusted is different. Specifically, if the interaction operation instruction is a scaling instruction for the three-dimensional vehicle model, the three-dimensional vehicle model is scaled in the user interface based on the scaling instruction. Scaling is further divided into zooming in and zooming out. If it is a pinch instruction, the three-dimensional vehicle model is scaled down in the user interface based on the pinch instruction, allowing the user to view the overall structure of the three-dimensional vehicle model more comprehensively. If it is a zoom-in instruction, the three-dimensional vehicle model is zoomed in the user interface based on the zoom-in instruction, enabling the user to view the local structure of the three-dimensional vehicle model, and the corresponding two-dimensional control is also enlarged accordingly, facilitating the user to check and click.
[0072] Among them, when the user rotates, scales, or moves the three-dimensional vehicle model in the user interface, a position adjustment instruction is triggered. If the interaction operation instruction is a position adjustment instruction for the three-dimensional vehicle model, the display position of the three-dimensional vehicle model is adjusted in the user interface based on the position adjustment instruction, allowing the user to adjust the three-dimensional vehicle model according to their own needs and view the three-dimensional vehicle model and the two-dimensional control more comprehensively. When the user moves or rotates the three-dimensional vehicle model in the user interface, an angle adjustment instruction may also be triggered. If the interaction operation is an angle adjustment instruction for the three-dimensional vehicle model, the display angle of the three-dimensional vehicle model is adjusted in the user interface based on the angle adjustment instruction, facilitating the user to view the three-dimensional vehicle model from different angles. During the scaling process, display position adjustment process, or display angle adjustment process of the three-dimensional vehicle model, the display content of the two-dimensional control associated with the vehicle component on the user interface is adjusted following the associated vehicle component, enabling the user to view the three-dimensional vehicle model and the two-dimensional control in all directions. By combining the two-dimensional control with the three-dimensional vehicle model, in terms of use, the three-dimensional vehicle model can visually meet the user's needs, and the two-dimensional control can meet the user's touch needs; at the rendering level, the two-dimensional control and the three-dimensional vehicle model are in different rendering levels. Adopting the two-dimensional control to follow the three-dimensional vehicle model can reduce rendering consumption.
[0073] In a possible implementation manner, adjusting the display content of the three-dimensional vehicle model in the user interface according to the interaction operation instruction includes:
[0074] Based on the interaction operation instruction, determining the visible vehicle components of the three-dimensional vehicle model within the simulated user's viewing range; displaying the visible vehicle components in the user interface;
[0075] Correspondingly, the two-dimensional control associated with the visible vehicle component is the target two-dimensional control. The display content of at least one two-dimensional control corresponding to the three-dimensional vehicle model on the user interface is adjusted following the three-dimensional vehicle model, including: the display content of the target two-dimensional control on the user interface is adjusted following the visible vehicle component.
[0076] Among them, the user's perspective is relative to the user interface. See Figure 2 , from the user's perspective, the left side body, the front of the vehicle, the rear of the vehicle, and the top of the vehicle of the three-dimensional vehicle model are visible, while the right side body is invisible. The visible vehicle components include the left front door, the left front window, the left rear door, the left rear window, the charging port, the left front wheel, the left rear wheel, the engine hood, and the sunroof, all of which belong to the visible vehicle components and are displayed in the user interface.
[0077] Specifically, the interaction operation instruction can be an opening instruction or a closing instruction triggered by the user for a target vehicle component on the three-dimensional vehicle model. Or, the interaction operation instruction can be a scaling instruction, a position adjustment instruction, or an angle adjustment instruction triggered by the user for the three-dimensional vehicle model, so as to determine the visible vehicle components of the three-dimensional vehicle model within the simulated user's perspective range based on the interaction instruction.
[0078] Among them, the simulated user's perspective range is simulated by a virtual camera. What the user sees is equivalent to what the virtual camera sees. What the virtual camera sees is the content within the frustum range. The content outside the frustum range is invisible to the virtual camera. Therefore, the simulated user's perspective range can be converted into the frustum range corresponding to the virtual camera. First, determine the frustum range corresponding to the virtual camera. According to the position information of the vehicle components in the three-dimensional vehicle model, the three-dimensional model within the frustum range corresponding to the virtual camera can be determined. The vehicle components that are not blocked within the frustum range are the visible vehicle components and are displayed in the user interface. The blocked vehicle components are not displayed in the user interface.
[0079] Correspondingly, the two-dimensional control associated with the visible vehicle component is the target two-dimensional control. In the above example, the left front door, the left front window, the left rear door, the left rear window, the charging port, and the engine hood each have their own associated two-dimensional controls, and these associated two-dimensional controls are the target two-dimensional controls. See Figure 2 , the front of the three-dimensional vehicle model faces the user, and the two-dimensional control of the trunk at the rear of the vehicle cannot be seen from the user's perspective. This part belongs to the blocked vehicle components and is not displayed in the user interface. The user adjusts the position or angle of the three-dimensional vehicle model so that the rear part faces the user. See Figure 4, thereby displaying the trunk and associated two-dimensional controls in the user interface. Specifically, when a position adjustment instruction or an angle adjustment instruction for the three-dimensional vehicle model triggered by the user is obtained, the visible vehicle components are determined, and the visible vehicle components are displayed in the user interface. Moreover, during the adjustment process, the content displayed by the target two-dimensional control on the user interface follows the adjustment of the visible vehicle components. Specifically, according to the distance between the visible vehicle components and the virtual camera, the display size of the target two-dimensional control on the user interface is obtained, so as to perform adjustment based on the position information of the visible vehicle components and the display size of the target two-dimensional control on the user interface. Continue to refer to Figure 4 , from the perspective of the user, the two-dimensional controls associated with the unobstructed vehicle components are displayed in the user interface, while the two-dimensional controls associated with the obstructed vehicle components are not displayed in the user interface, such as the engine hood of the vehicle head and the associated two-dimensional controls.
[0080] Optionally, determining the visible vehicle components of the three-dimensional vehicle model within the simulated user perspective range includes:
[0081] Obtaining the position information of the vehicle components in the three-dimensional vehicle model; according to the position information of the vehicle components, determining the vehicle components within the frustum range corresponding to the virtual camera of the three-dimensional vehicle model, where the frustum range corresponding to the virtual camera is the simulated user perspective range; among the vehicle components within the frustum range corresponding to the virtual camera, determining the unobstructed vehicle components, and the unobstructed vehicle components are the visible vehicle components.
[0082] Specifically, the Unity tool is used to obtain the position information of each vehicle component in the three-dimensional vehicle model. The position information of the left front door can be the center point of the left front door. Specifically, each vehicle component has a Transform component, and the Transform component is used to determine the position of the component in the three-dimensional vehicle model. By calling the position property of the Transform component of the left front door, the position information of the component in the world coordinate system is obtained.
[0083] To better adapt to changes, a parameter of the offset value is incorporated into the calculation of the three-dimensional coordinates. Coordinate offset is the addition of two vectors. Figure 7 shows the situation of adding two two-dimensional vectors, and for three-dimensional vectors, an additional z-axis dimension is added, that is, two vectors A: (x1, y1, z1), vector B: (x2, y2, z2), vector C = vector A + vector B, vector C = (x1 + x2, y1 + y2, z1 + z2).
[0084] In this embodiment, the simulated user perspective range can be converted into the frustum range corresponding to the virtual camera. Refer toFigure 8 , the viewing frustum range of the virtual camera is a fan-shaped area range, and this viewing frustum range is an area that simulates the user's perspective. From the user's perspective, the components located within the fan-shaped area range and not blocked are visible vehicle components. For example, the vehicle component 801 of the 3D vehicle model is not within the fan-shaped area range, so the vehicle component 801 is an invisible vehicle component. The vehicle components 802 and 803 of the 3D vehicle model are within the fan-shaped area range. Among them, the vehicle component 803 is blocked by the vehicle component 802, so the vehicle component 802 is a visible vehicle component, while the vehicle component 803 is an invisible vehicle component.
[0085] Specifically, the vehicle components are determined using the obtained position information. The position information of the vehicle components in the 3D vehicle model is obtained. According to the position information of the vehicle components, the vehicle components of the 3D vehicle model within the viewing frustum range corresponding to the virtual camera are determined. If there is a situation where one vehicle component is blocked by other vehicle components among the components within the viewing frustum range, the blocked vehicle component is invisible relative to the user's perspective. Among the vehicle components within the viewing frustum range corresponding to the virtual camera, the unblocked vehicle components are determined. Figure 8 Among them, the components within the fan-shaped area range and not blocked by other vehicle components are visible vehicle components.
[0086] Optionally, determining the vehicle components of the 3D vehicle model within the viewing frustum range corresponding to the virtual camera according to the position information of the vehicle components includes:
[0087] According to the position information of the vehicle components, the vector corresponding to the virtual camera relative to the vehicle components is determined; the angle between the vector corresponding to the vehicle components and the vector corresponding to the virtual camera is calculated; if the angle is less than the preset angle, the vehicle components are determined as the vehicle components within the viewing frustum range corresponding to the virtual camera, and the preset angle is half of the included angle of the fan-shaped area corresponding to the viewing frustum range of the virtual camera.
[0088] In this embodiment, specifically, the Sphere trigger provided by Unity or OverLaps in Physics is used to construct a sphere detection area. An object array is established to store all 3D object objects in the sphere area formed by OverlapSphere in one frame. The angle between the direction the virtual camera faces and the detected target direction is calculated, Vector3.Angle(transform.forward,TargetPosition-transform.position), such as Figure 8As shown, the f vector represents the forward vector, which represents the direction the virtual camera is facing. V1 and V2 represent the directions of the detected objects relative to the position of the virtual camera. The fan-shaped area represents the viewing frustum range of the camera. According to the position information of the vehicle components, the vectors corresponding to the virtual camera relative to each vehicle component are determined, and the angles between the vectors corresponding to each vehicle component and the vector corresponding to the virtual camera are calculated. For example Figure 8 As shown, the angles between the vectors corresponding to vehicle component 801, vehicle component 802, and vehicle component 803 and the vector corresponding to the virtual camera are calculated respectively, and the angles are compared with a preset angle. According to the comparison result, the vehicle components within the viewing frustum range corresponding to the virtual camera are determined.
[0089] Specifically, referring to Figure 8 , the preset angle is represented by α. α is half of the included angle of the fan-shaped area corresponding to the viewing frustum range of the virtual camera. If the angle corresponding to the vehicle component is less than the preset angle, the vehicle component is determined to be within the viewing frustum range corresponding to the virtual camera; if the angle corresponding to the component is greater than or equal to the preset angle, the vehicle component is determined to be outside the viewing frustum range corresponding to the virtual camera. The vehicle components outside the viewing frustum range are not displayed in the user interface, and whether the vehicle components within the viewing frustum range are displayed in the user interface also needs to determine whether they are occluded. If not occluded, they are displayed in the user interface.
[0090] Optionally, determining the unoccluded vehicle components includes:
[0091] Emit a ray within the viewing frustum range starting from the virtual camera to determine the collision situation between the vehicle components within the viewing frustum range and the ray; determine the vehicle components that collide with the ray within the viewing frustum range as the unoccluded vehicle components.
[0092] In this embodiment, the Unity tool is used to emit a ray within the viewing frustum range to determine whether the components of the 3D vehicle model are occluded. Specifically, the API provided by Unity: Physics.Raycast(Vector3 origin, Vector3 direction, out RaycastHit hitinfo, float distance, int LayerMask) is used. Among them, origin is the starting point of the ray, starting from the virtual camera; since it involves position coordinates, the vector unit Vector3 is used to represent it, which is the three-dimensional coordinate position of the virtual camera here; direction is the direction of the ray, and since it involves direction coordinates, the vector unit Vector3 is used to represent it, which is the positive direction of the virtual camera here, that isFigure 8 The forward vector in it; hitinfo is a structure that can store all the information of the collision body. Through the above API, if the ray intersects any collision body, it returns true, otherwise it returns false. If there are other components between the virtual camera and the components, the ray will be blocked by the obstacle, that is, the "field of view" of the virtual camera is "blocked" by the obstacle. Through the above method, the components that collide with the ray within the frustum are determined as the unobstructed vehicle components, and the unobstructed vehicle components are the visible vehicle components corresponding to the 3D vehicle model.
[0093] In the above process, the most important process is the projection transformation process, that is, the transformation matrix from CameraSpace to ClipSpace. Among them, "Clip" means clipping, and "ClipSpace" is the clipping space. For all objects in the 3D scene, from the rendering level, only the objects within the frustum will participate in the rendering, and the parts outside the frustum do not participate in the clipping. As Figure 9 shown, the trapezoidal polygon formed between the imaging plane (near plane) and the far plane is part of the frustum. There are 6 faces in total: top, bottom, left, right, far, and near. The objects within the frustum range are visible, and vice versa.
[0094] Optionally, the display content of the target two-dimensional control on the user interface is adjusted following the visible vehicle components, including:
[0095] Determine the distance between the visible vehicle component and the virtual camera; according to the distance between the visible vehicle component and the virtual camera, obtain the display size of the target two-dimensional control on the user interface, where the distance and the display size are inversely correlated; according to the position information of the visible vehicle component and the display size of the target two-dimensional control on the user interface, superimpose and display the target two-dimensional control on the visible vehicle component.
[0096] In this embodiment, determine the distance between the visible vehicle component and the virtual camera, obtain a preset threshold, and the preset threshold includes a minimum threshold and a maximum threshold. According to the distance between the position information of the visible vehicle component and the virtual camera, the preset threshold, and the preset vector unit, obtain the display size of the target two-dimensional control on the user interface.
[0097] Regarding the description of the display size, as Figure 10 shown, 3D objects follow the rule of "near is big and far is small". Figure 10 shows that object A is relatively close to the virtual camera, and object A appears relatively large in the camera view, while object A is relatively far from the virtual camera, and object A appears relatively small in the camera view.
[0098] Optionally, determining the distance between the visible vehicle component and the virtual camera includes:
[0099] Determine that the depth value of the visible vehicle component within the frustum corresponding to the virtual camera is the distance between the visible vehicle component and the virtual camera.
[0100] In this embodiment, the depth value of the visible vehicle component within the frustum corresponding to the virtual camera is determined as the distance between the visible vehicle component and the virtual camera. Specifically, according to the position information of the visible vehicle component and the position information of the virtual camera, calculate the depth value of the visible vehicle component within the frustum corresponding to the virtual camera. As Figure 11 shown, Z1 is the depth value of the visible vehicle component A within the frustum corresponding to the virtual camera, and Z2 is the depth value of the visible vehicle component B within the frustum corresponding to the virtual camera. Specifically, use the API provided by Unity - Vector3.Distance(Vector3 a, Vector3 b), which returns the distance between the three - dimensional vector a and the three - dimensional vector b. Substitute the 3D coordinates of the virtual camera and the 3D coordinates of the 3D object to be calculated into a and b of the above method, and the depth value of the visible vehicle component within the frustum corresponding to the virtual camera can be obtained. The depth value is inversely correlated with the display size. The smaller the depth value, the relatively larger the display size; the larger the depth value, the relatively smaller the display size.
[0101] It should be noted that in the rendering layer, in Unity's graphics rendering pipeline, the near plane can actually be understood as the "imaging plane". With this standard, the depth value of the object within the frustum corresponding to the virtual camera can be calculated. In the logical layer, it is actually the distance between the object and the virtual camera.
[0102] Optionally, obtaining the display size of the target two - dimensional control on the user interface according to the distance between the visible vehicle component and the virtual camera includes:
[0103] Calculate a first parameter according to the distance between the visible vehicle component and the virtual camera and a preset threshold, and determine the product of the first parameter and a preset vector unit as the display size of the target two - dimensional control on the user interface.
[0104] Specifically, substitute the distance between the position information of the visible vehicle component and the virtual camera, the preset threshold, and the preset vector unit into the formula. Among them, the preset threshold includes a threshold minimum value and a threshold maximum value. Use formula (1) to calculate the display size of the target two - dimensional control on the user interface. Formula (1) is expressed as:
[0105]
[0106] Wherein, X is the display size, Vector3.one represents the unit vector (1, 1, 1), X1 is the minimum threshold value, X2 is the maximum threshold value, and Z is the distance between the visible vehicle component and the virtual camera.
[0107] Furthermore, the position information of the visible vehicle component can be used as the position information of the target two-dimensional control. According to the position information of the visible vehicle component and the display size of the target two-dimensional control on the user interface, the target two-dimensional control is superimposed and displayed on the visible vehicle component. The target two-dimensional control follows the principle of "objects appear larger when they are closer and smaller when they are farther away", providing a better visual experience for the user.
[0108] See Figure 2 , with the vehicle head facing the user and the charging port being closer to the virtual camera relative to the left door. Through the above method, the position information and display size of the two-dimensional control of the charging port and the position information of the two-dimensional control of the left door are determined. According to the position information and display size of the two-dimensional control, the two-dimensional control on the visible component is rendered and displayed at the second rendering level, making the size of the two-dimensional control of the charging port smaller than the size of the two-dimensional control of the left door, that is, there will be no penetration phenomenon, and at the same time presenting a visual experience of "objects appear larger when they are closer and smaller when they are farther away".
[0109] Furthermore, if the user adjusts the three-mode vehicle model, through the above method, the position information and display size of the two-dimensional control of the charging port and the position information of the two-dimensional control of the left door are re-determined. According to the position information and display size of the two-dimensional control, the two-dimensional control on the visible component is rendered and displayed at the second rendering level. See Figure 4 , the display size of the two-dimensional control of the charging port on the user interface is larger than the display size of the two-dimensional control of the left door on the user interface, that is, there will be no penetration phenomenon, and at the same time presenting a visual experience of "objects appear larger when they are closer and smaller when they are farther away", which is convenient for the user to touch.
[0110] In the present invention, compared with the three-dimensional control of the prior art, the two-dimensional control is used to change with the change of the three-dimensional vehicle model. Since the three-dimensional rendering and two-dimensional rendering process different rendering levels, it can effectively reduce unnecessary rendering, reduce rendering consumption, and effectively improve performance. Moreover, there will be no penetration phenomenon, which is convenient for the user to use the control.
[0111] Figure 12 shows a schematic structural diagram of an embodiment of the display processing device for the three-dimensional vehicle model of the present invention. As Figure 12 shown, the device 1200 includes: a display module 1201 and a processing module 1202.
[0112] Among them, the display module 1201 is used to display a three-dimensional vehicle model in the user interface. The processing module 1202 is used to, when an interaction operation instruction for the three-dimensional vehicle model is obtained, adjust the display content of the three-dimensional vehicle model in the user interface according to the interaction operation instruction, and, during the adjustment process, the display content of at least one two-dimensional control corresponding to the three-dimensional vehicle model on the user interface follows the adjustment of the three-dimensional vehicle model.
[0113] In an optional manner, the processing module 1202 is further used to, during the adjustment process, the display position of at least one two-dimensional control corresponding to the three-dimensional vehicle model on the user interface follows the adjustment of the three-dimensional vehicle model; and / or, the display size of the two-dimensional control on the user interface follows the adjustment of the three-dimensional vehicle model.
[0114] In an optional manner, the processing module 1202 is further used to, during the adjustment process, the display position of at least one two-dimensional control corresponding to the three-dimensional vehicle model on the user interface follows the movement of the associated vehicle component.
[0115] In an optional manner, the processing module 1202 is further used to, during the adjustment process, the display size of at least one two-dimensional control corresponding to the three-dimensional vehicle model on the user interface follows the change in the size of the three-dimensional vehicle model, where the size is positively correlated with the display size.
[0116] In an optional manner, if the interaction operation instruction is an opening instruction for a target vehicle component on the three-dimensional vehicle model, an animation for opening the target vehicle component is played in the user interface; if the interaction operation instruction is a closing instruction for a target vehicle component on the three-dimensional vehicle model, an animation for closing the target vehicle component is played in the user interface.
[0117] In an optional manner, if the interaction operation instruction is a scaling instruction for the three-dimensional vehicle model, the three-dimensional vehicle model is scaled in the user interface based on the scaling instruction; if the interaction operation instruction is a position adjustment instruction for the three-dimensional vehicle model, the display position of the three-dimensional vehicle model is adjusted in the user interface based on the position adjustment instruction; if the interaction operation instruction is an angle adjustment instruction for the three-dimensional vehicle model, the display angle adjustment of the three-dimensional vehicle model is displayed in the user interface based on the angle adjustment instruction.
[0118] In an optional manner, the processing module 1202 is further used to open or close a vehicle entity associated with the three-dimensional vehicle model; or, receive an interaction operation acting on a two-dimensional control; or, receive an interaction operation acting on the three-dimensional vehicle model.
[0119] In an alternative manner, the processing module 1202 is further configured to determine visible vehicle components of the three-dimensional vehicle model within the range of the simulated user's perspective based on the interaction operation instruction; display the visible vehicle components in the user interface; and during the adjustment process, the processing module 1202 is further configured to cause the display content of at least one target two-dimensional control corresponding to the three-dimensional vehicle model on the user interface to be adjusted following the visible vehicle components.
[0120] In an alternative manner, the processing module 1202 is further configured to obtain the position information of the vehicle components in the three-dimensional vehicle model; determine the vehicle components of the three-dimensional vehicle model within the frustum range corresponding to the virtual camera based on the position information of the vehicle components, where the frustum range corresponding to the virtual camera is the simulated user's perspective range; and among the vehicle components within the frustum range corresponding to the virtual camera, determine the unoccluded vehicle components, and the unoccluded vehicle components are the visible vehicle components.
[0121] In an alternative manner, the processing module 1202 is further configured to determine the vector corresponding to the virtual camera relative to the vehicle components based on the position information of the vehicle components; calculate the angle between the vector corresponding to the vehicle components and the vector corresponding to the virtual camera; if the angle is less than a preset angle, determine the vehicle components as the vehicle components within the frustum range corresponding to the virtual camera, where the preset angle is half of the sector angle corresponding to the frustum range of the virtual camera.
[0122] In an alternative manner, the processing module 1202 is further configured to emit a ray within the frustum range starting from the virtual camera to determine the collision situation between the vehicle components within the frustum range and the ray; and determine the vehicle components that collide with the ray within the frustum range as the unoccluded vehicle components.
[0123] In an alternative manner, the processing module 1202 is further configured to determine the distance between the visible vehicle components and the virtual camera; obtain the display size of the target two-dimensional control on the user interface based on the distance between the visible vehicle components and the virtual camera, where the distance and the display size are inversely correlated; and superimpose and display the target two-dimensional control on the visible vehicle components based on the position information of the visible vehicle components and the display size of the target two-dimensional control on the user interface.
[0124] In an alternative manner, the processing module 1202 is further configured to determine that the depth value of the visible vehicle components within the frustum corresponding to the virtual camera is the distance between the visible vehicle components and the virtual camera.
[0125] In an alternative manner, the processing module 1202 is further configured to calculate a first parameter according to the distance between the visible vehicle component and the virtual camera and a preset threshold, and determine the product of the first parameter and a preset vector unit as the display size of the target two-dimensional control on the user interface.
[0126] Compared with the three-dimensional controls in the prior art, using two-dimensional controls that change with the changes of the three-dimensional vehicle model, due to different rendering levels for three-dimensional rendering and two-dimensional rendering, it can effectively reduce unnecessary rendering, reduce rendering consumption, and effectively improve performance. Moreover, there will be no phenomenon of model penetration, which is convenient for users to use the controls.
[0127] Figure 13 The schematic structural diagram of an embodiment of the electronic device of the present invention is shown. The specific embodiments of the present invention do not limit the specific implementation of the electronic device.
[0128] As Figure 13 shown, the electronic device may include: a processor 1302, a communications interface 1304, a memory 1306, and a communication bus 1308.
[0129] Among them: the processor 1302, the communications interface 13013, and the memory 1306 communicate with each other through the communication bus 1308. The communications interface 13013 is used to communicate with network elements of other devices such as clients or other servers. The processor 1302 is configured to execute the program 1310, and specifically may execute the relevant steps in the above-mentioned embodiment of the display processing method for the three-dimensional vehicle model.
[0130] Specifically, the program 1310 may include program code, and the program code includes computer-executable instructions.
[0131] The processor 1302 may be a central processing unit CPU, or a specific integrated circuit ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the embodiments of the present invention. One or more processors included in the electronic device may be of the same type of processor, such as one or more CPUs; or may be of different types of processors, such as one or more CPUs and one or more ASICs.
[0132] The memory 1306 is used to store the program 1310. The memory 1306 may include high-speed RAM memory, and may also include non-volatile memory, such as at least one disk memory.
[0133] Specifically, the program 1310 can be called by the processor 1302 to cause the electronic device to perform operations of the display processing method for the three-dimensional vehicle model.
[0134] Compared with the three-dimensional controls in the prior art, using two-dimensional controls that change with the changes of the three-dimensional vehicle model, due to different rendering levels for three-dimensional rendering and two-dimensional rendering, it can effectively reduce unnecessary rendering, reduce rendering consumption, and effectively improve performance. Moreover, there will be no phenomenon of penetration, which is convenient for users to use the controls.
[0135] Figure 14 The figure shows a schematic physical structure diagram of a controller provided by the present invention, as Figure 14 shown. The controller may include: a processor 1401, a communications interface 1402, a memory 1403, and a communication bus 1404. Among them, the processor 1401, the communications interface 1402, and the memory 1403 complete mutual communication through the communication bus 1404. The processor 1401 can execute the executable data instructions stored in the memory 1403 to implement some or all of the steps in the display processing method for the three-dimensional vehicle model provided by the above embodiments.
[0136] In addition, when the executable data instructions stored in the above-mentioned memory 1403 are implemented in the form of software functional units and sold or used as an independent product, they can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the embodiments of the present invention, in essence, or the part that contributes to the related art, can be embodied in the form of a software product. The software product is stored in a storage medium and includes several instructions for causing an electronic device (which may 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 embodiments of the present invention.
[0137] The embodiments of the present invention provide a computer-readable storage medium, and the storage medium stores at least one executable instruction. When the executable instruction runs on an electronic device / device, it causes the electronic device / device to execute the display processing method for the three-dimensional vehicle model in any of the above method embodiments.
[0138] The embodiments of the present invention provide a computer program product, including a computer program. When the computer program is executed by a processor, it implements the display processing method for the three-dimensional vehicle model in any of the above method embodiments.
[0139] The algorithms or displays provided herein are not inherently related to any specific computer, virtual system, or other device. In addition, the embodiments of the present invention are not directed to any specific programming language.
[0140] In the specification provided herein, a large number of specific details are set forth. However, it will be understood that embodiments of the present invention may be practiced without these specific details. Similarly, in order to streamline the present invention and assist in understanding one or more of the various inventive aspects, in the above description of the exemplary embodiments of the present invention, the various features of the embodiments of the present invention are sometimes grouped together into a single embodiment, figure, or description thereof. Among them, the claims following the specific implementation manners are hereby expressly incorporated into the specific implementation manners, where each claim itself serves as a separate embodiment of the present invention.
[0141] Those skilled in the art can understand that the modules in the devices in the embodiments can be adaptively changed and disposed in one or more devices different from the embodiments. The modules or units or components in the embodiments can be combined into one module or unit or component, and in addition, they can be divided into multiple sub-modules or sub-units or sub-components. Except that at least some of such features and / or processes or units are mutually exclusive.
[0142] It should be noted that the above embodiments illustrate the present invention rather than limit the present invention, and those skilled in the art can design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in the claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The present invention can be implemented by means of hardware including several different elements and by means of a suitably programmed computer. In a unit claim listing several devices, several of these devices may be embodied by the same item of hardware. The use of the words first, second, and third, etc. does not denote any order. These words can be interpreted as names. The steps in the above embodiments, unless otherwise specified, should not be construed as limiting the order of execution.
Claims
1. A display processing method for a three-dimensional vehicle model, characterized in that: include: Displaying a three-dimensional vehicle model and two-dimensional controls corresponding to and associated with vehicle components on a user interface; the three-dimensional vehicle model and the two-dimensional controls are at different rendering levels, the three-dimensional vehicle model is rendered and displayed at one rendering level, and the two-dimensional controls are rendered and displayed at another rendering level; When an interactive operation instruction for the three-dimensional vehicle model is obtained, the display content of the three-dimensional vehicle model in the user interface is adjusted according to the interactive operation instruction, and, During the adjustment process, the display content of at least one two-dimensional control corresponding to the three-dimensional vehicle model on the user interface is adjusted along with the three-dimensional vehicle model; The adjusting the display content of the three-dimensional vehicle model in the user interface according to the interactive operation instruction includes: Based on the interactive operation instruction, determining a visible vehicle component of the three-dimensional vehicle model within a simulated user viewing angle, and a two-dimensional control associated with the visible vehicle component as a target two-dimensional control; Displaying the visible vehicle component in the user interface and determining a distance between the visible vehicle component and a virtual camera; Obtaining a display size of the target two-dimensional control on the user interface according to a distance between the visible vehicle component and the virtual camera, wherein the distance is inversely correlated with the display size; The target two-dimensional control is displayed by overlaying on the visible vehicle component according to the position information of the visible vehicle component and the display size of the target two-dimensional control on the user interface.
2. The method according to claim 1, characterized in that: The display content of the two-dimensional control on the user interface is adjusted following the three-dimensional vehicle model, including: The display position of the two-dimensional control on the user interface is adjusted following the three-dimensional vehicle model; And / or, the display size of the two-dimensional control on the user interface is adjusted following the three-dimensional vehicle model.
3. The method according to claim 2, characterized in that The display position of the two-dimensional control on the user interface is located on the vehicle component associated with the two-dimensional control; The display position of the two-dimensional control on the user interface follows the adjustment of the three-dimensional vehicle model, including: the display position of the two-dimensional control on the user interface follows the movement of the associated vehicle component.
4. The method according to claim 2, characterized in that: The display position of the two-dimensional control on the user interface is located on the vehicle component associated with the two-dimensional control; The display size of the two-dimensional control on the user interface follows the adjustment of the three-dimensional vehicle model, including: the display size of the two-dimensional control on the user interface follows the size change of the three-dimensional vehicle model, wherein the size is positively correlated with the display size.
5. The method according to any one of claims 1 to 4, characterized in that The adjusting the display content of the three-dimensional vehicle model in the user interface according to the interactive operation instruction includes: If the interactive operation instruction is an instruction to open a target vehicle component on the three-dimensional vehicle model, an animation of opening the target vehicle component is played in the user interface; If the interactive operation instruction is a closing instruction for a target vehicle component on the three-dimensional vehicle model, an animation for closing the target vehicle component is played in the user interface.
6. The method according to any one of claims 1 to 4, characterized in that The adjusting the display content of the three-dimensional vehicle model in the user interface according to the interactive operation instruction includes: If the interactive operation instruction is a scaling instruction for the three-dimensional vehicle model, scaling the three-dimensional vehicle model in the user interface based on the scaling instruction; If the interactive operation instruction is a position adjustment instruction for the three-dimensional vehicle model, based on the position adjustment instruction, adjusting the display position of the three-dimensional vehicle model in the user interface; If the interactive operation instruction is an instruction for adjusting the angle of the three-dimensional vehicle model, based on the angle adjustment instruction, the display angle of the three-dimensional vehicle model is adjusted in the user interface.
7. The method according to any one of claims 1 to 4, characterized in that The conditions for triggering the generation of the interactive operation instruction include: Opening or closing a vehicle entity associated with the three-dimensional vehicle model; or, receiving an interactive operation acting on the two-dimensional control; Or, receiving an interactive operation acting on the three-dimensional vehicle model.
8. The method according to claim 1, characterized in that The determining of the visible vehicle components of the three-dimensional vehicle model within the range of the simulated user's viewing angle includes: Obtaining position information of vehicle components in the three-dimensional vehicle model; Determine, according to the position information of the vehicle components, the vehicle components of the three-dimensional vehicle model within the range of the viewing frustum corresponding to the virtual camera, the range of the viewing frustum corresponding to the virtual camera being the viewing angle range of the simulated user; Among the vehicle components within the range of the viewing frustum corresponding to the virtual camera, unobstructed vehicle components are determined, and the unobstructed vehicle components are the visible vehicle components.
9. The method according to claim 8, characterized in that The step of determining the vehicle components of the three-dimensional vehicle model within the range of the viewing frustum corresponding to the virtual camera according to the position information of the vehicle components includes: Determine, according to the position information of the vehicle component, a vector corresponding to the virtual camera relative to the vehicle component; Calculate the angle between the vector corresponding to the vehicle component and the vector corresponding to the virtual camera; If the angle is smaller than a preset angle, the vehicle component is determined as a vehicle component within the viewing frustum range corresponding to the virtual camera, and the preset angle is half of the angle of the fan-shaped area corresponding to the viewing frustum range of the virtual camera.
Citation Information
Patent Citations
Method and device for selecting browsing point location in virtual space based on external equipment
CN113722644A
Interaction method of vehicle-mounted system, vehicle and storage medium
CN114924669A