Model display method and device, electronic equipment and readable storage medium
By adjusting the number of models of the basic three -dimensional model to adapt to the target model surface of different scenarios, solve the problem of storage space occupation caused by various three -dimensional models in different scenarios, and achieve the effect of saving storage space and reducing R & D costs.
Patent Information
- Application Number
- CN202411924988.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-25
- Publication Date
- 2025-01-24
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Various three-dimensional models need to be stored in different scenarios, resulting in a large storage space occupancy, and developers need to develop multiple three-dimensional models for each scenario to increase R&D costs.
By determining the number of target model surfaces of the three -dimensional model that currently needs to be displayed, if the number of model surface planes of the basic three -dimensional model is different from the target model surface, the number of model surfaces of the basic three -dimensional model is adjusted to obtain the target 3D model, and the target three -dimensional model is obtained, and the target 3D model is obtained. Adjust the model attributes according to the target status when necessary to adapt to different scenarios.
It reduces the number of stored 3D models, saves storage space, reduces R&D costs, and improves the configuration flexibility of 3D models.
Smart Images

Figure CN119359933A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of three-dimensional models, and more specifically, to a model display method, device, electronic device and readable storage medium in the field of three-dimensional models. Background Art
[0002] With the development of intelligence, it has become a norm to display the status of target objects through three-dimensional models. Three-dimensional models can more intuitively show the status of target objects.
[0003] When using some devices, there are many scenes that need to display three-dimensional models. Different three-dimensional models need to be displayed in different scenes, which leads to the need to store a large number of three-dimensional models at the same time, thus occupying more storage space. Summary of the invention
[0004] The present application provides a model display method, device, electronic device and storage medium, which can save storage space.
[0005] In a first aspect, a model display method is provided, the method comprising: Determine the number of target model faces of the target object three-dimensional model that needs to be displayed currently; If the number of model faces of the basic three-dimensional model is different from the number of model faces of the target model, the number of model faces of the basic three-dimensional model is adjusted to obtain a three-dimensional model of the target object; Display the 3D model of the target object.
[0006] Through the above technical solution, for different scenes, the host terminal can obtain the required target object three-dimensional model based on the basic three-dimensional model, so that there is no need to set up a three-dimensional model for each scene, reducing the number of stored three-dimensional models and saving storage space.
[0007] In conjunction with the first aspect, in some possible implementations, the basic three-dimensional model includes an initial model framework, and the number of model faces of the basic three-dimensional model is adjusted to obtain a three-dimensional model of the target object, including: The number of model faces of the initial model frame is adjusted to obtain the target model frame; wherein the number of model faces of the target model frame is the same as the number of model faces of the target model; The target model frame is rendered according to the model attributes of the target object three-dimensional model to obtain the target object three-dimensional model.
[0008] Through the above technical solution, the host terminal can flexibly configure different model attributes for the target object three-dimensional model for different scenes. In this way, the host terminal can render the target model framework according to the model attributes of the target object three-dimensional model to obtain the target object three-dimensional model corresponding to different scenes, thereby improving the configuration flexibility of the target object three-dimensional model.
[0009] In combination with the first aspect, in some possible implementations, adjusting the number of model faces of the initial model framework to obtain the target model framework includes: Acquire at least one vertex coordinate pre-configured for the three-dimensional model of the target object; wherein each vertex coordinate corresponds to a vertex in the initial model frame; For each vertex, multiple model faces formed by the vertices in the initial model frame are merged into one model face to obtain the target model frame.
[0010] Through the above technical solution, the host terminal determines the face merging rule corresponding to the target face number difference, and can accurately adjust the face number of the model to match the target face number.
[0011] In conjunction with the first aspect, in some possible implementations, before rendering the target model frame according to the model attributes of the target object three-dimensional model to obtain the target object three-dimensional model, the method further includes: Obtain at least one set of model attributes corresponding to the initial model framework; wherein each set of model attributes corresponds to a target object state; Model attributes of the three-dimensional model of the target object are determined from at least one set of model attributes according to the current target object state.
[0012] Through the above technical solution, the host terminal can provide basic data for the subsequent determination of the model attributes and rendering of the three-dimensional model of the target object by acquiring at least one group of model attributes corresponding to the initial model framework; at the same time, the host terminal can select the model attributes corresponding to the three-dimensional model of the target object from at least one group of model attributes according to the current state of the target object, so that the three-dimensional model of the target object is consistent with the state of the target object.
[0013] In conjunction with the first aspect, in some possible implementations, before adjusting the number of model faces of the basic three-dimensional model, the method further includes: Get the basic 3D model from the server; Alternatively, if at least one historical three-dimensional model is displayed in advance, one of the at least one historical three-dimensional models is determined as the basic three-dimensional model.
[0014] Through the above technical solution, the basic 3D model is pre-stored on the server, and the basic 3D model can be directly obtained on the host terminal, which is conducive to improving the response speed of the host terminal. At the same time, if the vehicle currently displays a historical 3D model in advance, it does not need to be obtained from the server, and a basic 3D model can be directly determined from the historical 3D model, so that the basic 3D model can be quickly obtained, thereby improving the display efficiency of the 3D model.
[0015] In conjunction with the first aspect, in some possible implementations, determining a basic three-dimensional model from at least one historical three-dimensional model includes: Determine a basic three-dimensional model from at least one historical three-dimensional model, the model number of which is greater than or equal to the number of faces of the target model; Alternatively, the face number difference between each historical 3D model and the target model is determined; and based on the face number difference corresponding to each historical 3D model, one with the smallest face number difference is determined from at least one historical 3D model as the basic 3D model.
[0016] In combination with the first aspect and the above implementation manner, in some possible implementation manners, before displaying the three-dimensional model of the target object, the method further includes: Obtaining the state parameters of the target object that need to be displayed through the three-dimensional model of the target object; The three-dimensional model of the target object is adjusted according to the target object state parameter so that the target object state displayed by the three-dimensional model of the target object corresponds to the target object state parameter.
[0017] Through the above technical solution, the host terminal can adjust the target state displayed by the target three-dimensional model through the target state parameters, which is conducive to the consistency of the target three-dimensional model with the actual target state and can better reflect the actual target state.
[0018] In a second aspect, a model display device is provided, the device comprising: A determination module, used to determine the number of target model faces of the target object three-dimensional model currently required to be displayed; An adjustment module, for adjusting the number of model faces of the basic three-dimensional model to obtain a three-dimensional model of the target object if the number of model faces of the basic three-dimensional model is different from the number of model faces of the target model; The display module is used to display the three-dimensional model of the target object.
[0019] In a third aspect, a vehicle is provided, comprising a memory for storing executable program code; A processor is used to call and run executable program code from a memory so that the vehicle executes the method in any possible implementation of the first aspect above.
[0020] In a fourth aspect, an executable program code product is provided, which includes: an executable program code, which, when executed on a computer, enables the computer to execute the method in any possible implementation of the first aspect.
[0021] In a fifth aspect, a readable storage medium is provided, which stores executable program code. When the executable program code runs on a computer, the computer executes the method in any possible implementation of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 is a schematic diagram of a vehicle model provided in an embodiment of the present application; Figure 2 is a flowchart of the steps of a model display method provided in an embodiment of the present application; Figure 3 A schematic diagram of a flow chart of a model display method provided in an embodiment of the present application; Figure 4 is a structural schematic diagram of a model display device provided in an embodiment of the present application; Figure 5 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0023] The technical solution in the present application will be described clearly and in detail below in conjunction with the accompanying drawings. In the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B: "and / or" in the text is only a description of the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, "multiple" means two or more than two.
[0024] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as suggesting or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features.
[0025] With the development of intelligence, more and more scenes need to display three-dimensional (3D) models in the use of some devices. Three-dimensional models are mainly composed of basic geometric elements such as vertices, edges, and faces (also called model faces). Among them, vertices refer to specific coordinate points in three-dimensional space and are one of the basic elements that constitute three-dimensional models; edges are line segments connecting two vertices, which are formed by connecting vertices into line segments; faces are closed polygons formed by three or more vertices connected by edges, which are the basic units that constitute three-dimensional models. The number of model faces refers to the number of faces (i.e., the number of polygons) that constitute a three-dimensional model.
[0026] Exemplarily, the three-dimensional models that need to be displayed in different scenarios are usually different. Taking a vehicle as an example, for example, a first vehicle model is usually required to be displayed on the vehicle's head unit system (HUT), and the first vehicle model can reflect the current overall state of the vehicle, such as the door switch state, window state, engine state and other vehicle status information; a second vehicle model is usually required to be displayed on the vehicle's dashboard, and the second vehicle model can reflect the vehicle's current instrument parameters, such as rotation speed, vehicle speed, tire pressure and other instrument parameters; when the vehicle starts the intelligent driving mode, a third vehicle model is usually required to be displayed on the HUT, and the third vehicle model can reflect the vehicle's automatic driving state, planned path, surrounding obstacles and other information. It should be understood that the scenarios for displaying vehicle models include but are not limited to the above examples.
[0027] In actual applications, the precision of vehicle models in different scenarios is different. The precision of vehicle models is related to the number of model faces. The larger the number of model faces, the higher the precision. For example, the first vehicle model generally requires a higher precision, and the number of model faces is generally more than 300,000; the second vehicle model has a lower precision, and usually requires a device model of about 150,000 model faces; the third vehicle model also has a lower precision, and usually requires a device model of about 20,000 model faces.
[0028] See also Figure 1 , Figure 1 : is a schematic diagram of a vehicle model provided in an embodiment of the present application. The vehicle model is composed of a polygonal mesh, which contains multiple polygonal faces in a three-dimensional space, each polygonal face is composed of multiple edges, and each edge has two vertices. Each polygonal face has a single texture, material and color, and the appearance of the vehicle can be reflected through a single texture, material and color.
[0029] When the number of model faces of the vehicle models displayed in different scenes is different, multiple vehicle models with different numbers of model faces need to be stored in the host terminal at the same time, which may take up a lot of storage space. Also, when the number of model faces of the vehicle models displayed in different scenes is different, the developer needs to develop corresponding vehicle models for different scenes respectively, which may develop a large number of vehicle models, resulting in high R&D investment costs.
[0030] The vehicle model includes a model frame, which may also be referred to as a polygonal mesh, and the number of model faces refers to the number of polygons included in the polygonal mesh.
[0031] See also Figure 2 , Figure 2 2 is a flowchart of the steps of a model display method provided by an embodiment of the present application. The execution subject of the method may be a host terminal in a vehicle, as shown in 2, and the method may include the following steps.
[0032] S201, determining the number of target model faces of the target object three-dimensional model currently required to be displayed.
[0033] Among them, the number of target model faces refers to the number of model faces required for the three-dimensional model of the target object that needs to be displayed at present. Taking the vehicle as an example, when the host terminal of the vehicle is started at the current moment and the first vehicle model needs to be displayed on the display screen of the host terminal, the number of target model faces can be 300,000 faces. For another example, if the vehicle currently needs to display the second vehicle model on the dashboard of the vehicle, the number of target model faces can be 150,000 faces; for another example, if the vehicle currently enters the intelligent driving mode and needs to display the third vehicle model on the display screen of the host terminal, the number of target model faces can be 20,000 faces.
[0034] Exemplarily, the R&D personnel can pre-configure the number of model faces of the vehicle model in different scenarios for the host terminal. For example, for the first vehicle model that needs to reflect the overall state of the vehicle, the number of model faces of the vehicle model can be pre-configured to be 300,000 faces; in the process of determining the target model face number, if the host terminal determines that the first vehicle model needs to be displayed on the host terminal at present, the pre-configured model face number of 300,000 can be determined as the target model face number. For another example, for the second vehicle model that needs to reflect the current instrument parameters of the vehicle, the number of model faces of the vehicle model can be pre-configured to be 150,000 faces; in the process of determining the target model face number, if the host terminal determines that the second vehicle model needs to be displayed on the dashboard of the vehicle at present, the pre-configured model face number of 150,000 can be determined as the target model face number. For another example, for the third vehicle model in the intelligent driving mode, the number of model faces of the vehicle model can be pre-configured to be 20,000 faces; in the process of determining the target model face number, if the host terminal determines that the third vehicle model needs to be displayed on the host terminal at present, the pre-configured model face number of 20,000 can be determined as the target model face number.
[0035] S202: If the number of model faces of the basic three-dimensional model is different from the number of model faces of the target model, the number of model faces of the basic three-dimensional model is adjusted to obtain a three-dimensional model of the target object.
[0036] S203, displaying a three-dimensional model of the target object.
[0037] Among them, the basic three-dimensional model can be a three-dimensional model pre-stored in the host terminal or server. The basic three-dimensional model can be pre-designed and have a fixed number of model faces. Taking the vehicle model as an example, the basic three-dimensional model can be the three-dimensional model with the largest number of model faces among all the three-dimensional models that the vehicle needs to display, and the number of model faces of the basic three-dimensional model is the maximum value of the number of model faces of all the three-dimensional models that the vehicle needs to display. For example, the vehicle needs to display the first vehicle model, the second vehicle model and the third vehicle model in the above example, and the basic three-dimensional model can be the vehicle model with the largest number of model faces among the first vehicle model, the second vehicle model and the third vehicle model, that is, the first vehicle model can be determined as the basic three-dimensional model.
[0038] In this embodiment, when the number of model faces of the basic three-dimensional model is different from the number of model faces of the target model, the host terminal can obtain the basic three-dimensional model pre-stored in the host terminal, or obtain the basic three-dimensional model from the server. After obtaining the basic three-dimensional model, the host terminal can determine whether the number of model faces of the basic three-dimensional model is the same as the number of model faces of the target model. If the number of model faces of the basic three-dimensional model is different from the number of model faces of the target model, the basic three-dimensional model cannot be directly applied in the current scene, and the number of model faces of the basic three-dimensional model needs to be adjusted.
[0039] For example, when a second vehicle model needs to be displayed on the dashboard of a vehicle, if the host terminal determines that the number of faces of the target model is 150,000 and the number of faces of the base vehicle model is 300,000, it can be determined that the number of faces of the base vehicle model is different from the number of faces of the target model. At this time, the host terminal can adjust the number of faces of the base vehicle model, for example, the polygons in the base vehicle model can be merged to obtain a target vehicle model with a model face number equal to 150,000. Afterwards, the host terminal can display the target vehicle model on the dashboard to reflect the instrument parameters of the vehicle through the displayed target vehicle model.
[0040] For another example, when the first vehicle model needs to be displayed on the host terminal of the vehicle, if the host terminal determines that the number of faces of the target model is 300,000 and the number of faces of the base vehicle model is 300,000, then it can be determined that the number of faces of the base vehicle model is the same as the number of faces of the target model. At this time, the host terminal does not need to adjust the number of faces of the base vehicle model, and can directly use the base vehicle model as the target vehicle model. Afterwards, the host terminal can display the target vehicle model (i.e., the base vehicle model) to reflect the overall state of the vehicle through the displayed target vehicle model.
[0041] In one embodiment, when it is determined that the number of model faces of the basic three-dimensional model is different from the number of face faces of the target model, the host terminal can merge the polygons in the basic three-dimensional model based on a preset merging algorithm to obtain a three-dimensional model of the target object. For example, the host terminal can determine the position coordinates of each polygon in the basic three-dimensional model; input the position coordinates of each polygon into a pre-trained clustering model to obtain a clustering result. The clustering result is a collection of multiple clusters, and each cluster can contain multiple polygons with adjacent position coordinates. Furthermore, in each cluster, a cluster center (i.e., a representative polygon in the cluster) is selected as the first polygon to be retained, and the remaining polygons in the cluster are used as second polygons. The second polygons are merged into the corresponding first polygons, and the merged three-dimensional model is used as the three-dimensional model of the target object.
[0042] In practical applications, the number of model faces of the basic 3D model can be set to be no less than the number of model faces of the 3D model displayed in all scenes. In this way, when the number of model faces of the basic 3D model is different from that of the target model, the number of model faces of the basic 3D model can be reduced by merging polygons in the basic 3D model to obtain the target object 3D model.
[0043] In another embodiment, the developer can divide each component with a single texture, material and color in the basic 3D model into a model module. Figure 1 For example, a wheel is composed of a tire and a hub, the tire has a single texture, material and color, and the hub has a single texture, material and color, therefore, the tire can be divided into a model module 101, and the hub can be divided into a model module 102. Similarly, the metal part of the door can be divided into a model module 103, and the glass part of the door can be divided into a model module 104.
[0044] For three-dimensional models in different scenarios, R&D personnel can determine one or more low-precision model modules in the basic three-dimensional model that do not need to be displayed with higher precision. For each low-precision model module, determine one or more groups of polygons that can be merged in the model module, where a group of polygons can be merged into one polygon, and then determine the common vertex coordinates in each group of polygons. In this way, for each low-precision model module, a vertex coordinate set consisting of a corresponding plurality of common vertex coordinates can be obtained. For each scene, at least one corresponding vertex coordinate set can be obtained, each vertex coordinate set corresponds to a low-precision model module, and at least one vertex coordinate set is stored in the host terminal.
[0045] Correspondingly, when the host terminal determines that the number of model faces of the basic three-dimensional model is different from the number of model faces of the target model, it can obtain at least one vertex coordinate set corresponding to the current scene. Then, the host terminal determines the vertex coordinates in each vertex coordinate set from the basic three-dimensional model, deletes the vertex corresponding to the vertex coordinate, and merges a group of polygons corresponding to the vertex into one polygon. The above operation is performed for each low-precision model module, and finally a three-dimensional model of the target object can be obtained.
[0046] In an embodiment of the present application, the host terminal determines the number of target model faces of the target object three-dimensional model that currently needs to be displayed, and when the number of model faces of the basic three-dimensional model is different from the number of target model faces, the number of model faces of the basic three-dimensional model is adjusted to obtain the target object three-dimensional model, and finally the target object three-dimensional model is displayed. In the method provided in the present application, for different scenes, the host terminal can obtain the required target object three-dimensional model based on the basic three-dimensional model, and there is no need to set the corresponding three-dimensional model for each scene, which can reduce the number of stored three-dimensional models and save storage space. At the same time, the basic three-dimensional model can be applied to different scenes, so in the development process of the three-dimensional model, the developers only need to develop a small number of three-dimensional models, thereby reducing the research and development costs.
[0047] Optionally, the basic three-dimensional model includes an initial model framework, and the number of model faces of the basic three-dimensional model is adjusted to obtain a three-dimensional model of the target object, including: The number of model faces of the initial model frame is adjusted to obtain the target model frame; The target model frame is rendered according to the model attributes of the target object three-dimensional model to obtain the target object three-dimensional model.
[0048] The number of model faces of the target model frame is the same as the number of target model faces. Model attributes refer to various parameters of the device model. Taking a vehicle as an example, the model attributes may include but are not limited to vehicle material, vehicle texture, vehicle color, etc. The model attributes of the target vehicle model may be model attributes pre-stored in the host terminal. For example, for the above-mentioned first vehicle model, second vehicle model and third vehicle model, corresponding model attributes may be stored respectively.
[0049] In one embodiment, the host terminal can obtain at least one vertex coordinate pre-configured for the three-dimensional model of the target object. For each vertex, the host terminal can delete the corresponding vertex in the initial model frame, so that the multiple model faces formed by the vertex in the initial model frame are merged into one model face to obtain the target model frame. At the same time, a 3D engine can be installed in the host terminal. After obtaining the target model frame, the host terminal can obtain the model attributes of the pre-stored three-dimensional model of the target object, and then render the target model frame through the rendering component in the 3D engine according to the model attributes of the three-dimensional model of the target object. Exemplarily, taking a vehicle as an example, during the rendering process, the host terminal can render the target model frame through the 3D engine and the model attributes such as vehicle material, vehicle texture, and vehicle color in the model attributes, determine the color and brightness of each pixel in the polygon of the target model frame, and thus obtain the three-dimensional model of the target object.
[0050] In an embodiment of the present application, the host terminal adjusts the number of model faces of the initial model frame to obtain a target model frame; and renders the target model frame according to the model attributes of the target object three-dimensional model to obtain the target object three-dimensional model. In the method provided in the present application, for different scenes, the host terminal can flexibly configure different model attributes for the target object three-dimensional model, so that the host terminal can render the target model frame according to the model attributes of the target object three-dimensional model to obtain the target object three-dimensional model corresponding to different scenes, thereby improving the configuration flexibility of the target object three-dimensional model.
[0051] Optionally, the number of model faces of the initial model frame is adjusted to obtain a target model frame, including: Acquire at least one vertex coordinate pre-configured for the three-dimensional model of the target object; wherein each vertex coordinate corresponds to a vertex in the initial model frame; For each vertex, multiple model faces formed by the vertices in the initial model frame are merged into one model face to obtain the target model frame.
[0052] In one embodiment, the basic 3D model includes an initial model framework, and the developer can divide the initial model framework into multiple framework modules. Figure 1 For example, the vehicle model includes an initial model framework, and R&D personnel can divide the polygonal mesh corresponding to the initial model framework into multiple framework modules.
[0053] For model frameworks in different scenarios, R&D personnel can determine one or more low-precision framework modules in the initial model framework that do not need to be displayed with higher precision. For each low-precision framework module, determine one or more groups of polygons that can be merged in the framework module, where a group of polygons can be merged into one polygon, and then determine the common vertex coordinates in each group of polygons. In this way, for each low-precision framework module, a vertex coordinate set consisting of a corresponding plurality of common vertex coordinates can be obtained. For each scene, at least one corresponding vertex coordinate set can be obtained, each vertex coordinate set corresponds to a low-precision framework module, and at least one vertex coordinate set is stored in the host terminal.
[0054] Correspondingly, when the host terminal determines that the number of model faces of the basic three-dimensional model is different from the number of model faces of the target model, it can obtain at least one vertex coordinate set corresponding to the current scene. Then, the host terminal determines the vertex coordinates in each vertex coordinate set from the initial model frame, deletes the vertex corresponding to the vertex coordinate, and merges a group of polygons corresponding to the vertex into one polygon. The above operation is performed for each low-precision frame module, and finally the target model frame can be obtained.
[0055] In another embodiment, for model frameworks in different scenarios, R&D personnel can determine one or more low-precision framework modules in the initial model framework that do not need to be displayed with a higher degree of precision. For each low-precision framework module, determine one or more groups of polygons that can be merged in the framework module, wherein a group of polygons includes two polygons, and the two polygons can be merged into one polygon. Thus, the common edges in each group of polygons can be determined, and then a group of vertex coordinates, i.e., a vertex coordinate subset, is determined based on the common edges, and the vertex coordinate subset contains two vertex coordinates. In this way, for each low-precision framework module, a vertex coordinate set consisting of multiple corresponding groups of vertex coordinate subsets can be obtained. For each scene, at least one corresponding group of vertex coordinate sets can be obtained, each vertex coordinate set corresponds to a low-precision framework module, and at least one vertex coordinate set is stored in the host terminal.
[0056] Correspondingly, when the host terminal determines that the number of model faces of the basic three-dimensional model is different from the number of model faces of the target model, it can obtain at least one vertex coordinate set corresponding to the current scene. Then, the host terminal determines the vertex coordinate subset in each vertex coordinate set from the initial model frame, and determines the corresponding edge from the vertex coordinate subset. Further, the corresponding edge in the vertex coordinate subset is deleted, and the two polygons connected by the edge are merged into one polygon. The above operation is performed for each low-precision framework module, and the target model framework can be finally obtained.
[0057] In another embodiment, the basic three-dimensional model includes an initial model frame, and when it is determined that the target face number difference is greater than the preset face number difference, the host terminal can determine the model face number of the initial model frame, that is, determine the number of polygons in the initial model frame. Further, the host terminal can determine a face number merging rule corresponding to the target face number difference; based on the face number merging rule, determine multiple first polygons from multiple polygons included in the initial model frame, and at least one second polygon corresponding to each first polygon; merge the second polygon into the corresponding first polygon to obtain the target model frame.
[0058] Exemplarily, a plurality of preset face number difference intervals may be pre-stored in the host terminal, and corresponding face number merging rules may be set for different face number difference intervals. In the process of adjusting the model face number of the basic three-dimensional model, the host terminal may determine the target face number difference interval in which the target face number difference is located from the plurality of face number difference intervals according to the target face number difference. Furthermore, the host terminal may determine the first polygon to be retained from the initial model framework according to the face number merging rule corresponding to the target face number difference interval. For each first polygon, determine at least one second polygon adjacent thereto, the second polygon being the polygon to be merged. After determining the first polygon and the corresponding second polygon, merge the second polygon into the corresponding first polygon, thereby obtaining the target model framework.
[0059] In practical applications, the number of polygonal faces of the initial model framework can be set to be no less than the number of faces of the target model.
[0060] Optionally, before rendering the target model frame according to the model attributes of the target object three-dimensional model to obtain the target object three-dimensional model, the method further includes: Obtain at least one set of model attributes corresponding to the initial model framework; Model attributes of the three-dimensional model of the target object are determined from at least one set of model attributes according to the current target object state.
[0061] In one embodiment, the basic 3D model may include an initial model frame and at least one set of model attributes. In another embodiment, the model attributes may be pre-stored in a server, and during the rendering of the target model frame, the host terminal may obtain at least one set of model attributes from the server.
[0062] Exemplarily, taking a vehicle as an example, the vehicle state may include but is not limited to the charging state, driving state, parking state, etc., and each group of model attributes corresponds to a vehicle state. For example, when the vehicle is in a charging state, the model attribute of the vehicle may be a first model attribute, and the first model attribute may include the vehicle color, the color of the charging indicator light (such as a red light indicating charging, and a green light indicating charging is complete), the vehicle texture, and the vehicle material; when the vehicle is in a driving state, the model attribute of the vehicle may be a second model attribute, and the second model attribute may include the vehicle color, the wheel color, the light color, the vehicle texture, and the vehicle material; when the vehicle is in a parking state, the model attribute of the vehicle may be a third model attribute, and the third model attribute may include the vehicle color, the door color, the vehicle texture, and the vehicle material, etc. In the process of rendering the target model framework, the host terminal can determine the current vehicle state of the vehicle, and determine the model attributes of the target vehicle model from at least one set of model attributes according to the current vehicle state of the vehicle. Exemplarily, the host terminal can pre-store a mapping table, which establishes a correspondence between different vehicle states and multiple sets of model attributes, and each set of vehicle states corresponds to a set of model attributes. When the host terminal needs to determine the model attributes of the target vehicle model, it can search in the mapping table according to the current vehicle state of the vehicle to obtain a set of model attributes corresponding to the current vehicle state, and the set of model attributes is the model attributes of the target vehicle model.
[0063] In one embodiment, the host terminal can obtain at least one set of model attributes corresponding to the initial model framework according to the current scene of the vehicle; and determine the model attributes of the target vehicle model from the at least one set of model attributes according to the current vehicle state of the vehicle. Exemplarily, when the first vehicle model needs to be displayed on the host terminal of the vehicle, the first model attribute and the second model attribute related to the first vehicle model can be obtained from the server. Furthermore, when the vehicle is in a charging state, the first model attribute can be selected as the model attribute of the target vehicle model; when the vehicle is in a driving state, the second model attribute can be selected as the model attribute of the target vehicle model.
[0064] In the embodiment of the present application, the host terminal can obtain at least one set of model attributes corresponding to the initial model framework; and determine the model attributes of the target object's three-dimensional model from the at least one set of model attributes according to the current target object's target state. In this way, the host terminal can provide basic data for the subsequent determination of the model attributes and rendering of the target object's three-dimensional model by obtaining at least one set of model attributes corresponding to the initial model framework; at the same time, the host terminal can select the model attributes corresponding to the target object's three-dimensional model from the at least one set of model attributes according to the current target object's target state, so that the target object's three-dimensional model can be consistent with the target object state.
[0065] Optionally, before adjusting the number of model faces of the basic three-dimensional model, the method further includes: Get the basic 3D model from the server; Alternatively, if at least one historical three-dimensional model is displayed in advance, one of the at least one historical three-dimensional models is determined as the basic three-dimensional model.
[0066] The host terminal may obtain the basic three-dimensional model locally, or may obtain the basic three-dimensional model from a cloud server, without limitation.
[0067] The historical 3D model refers to the 3D model of the target object currently being displayed. For example, taking a vehicle as an example, a vehicle model A is currently displayed on the host display screen, and a vehicle model B is displayed on the vehicle dashboard. The historical vehicle model includes vehicle model A and vehicle model B.
[0068] Exemplarily, in the process of acquiring the basic 3D model, the host terminal can determine whether the target object currently displays a historical 3D model. If at least one historical 3D model is displayed in advance, one of the at least one historical 3D model can be selected as the basic 3D model. For example, taking a vehicle model as an example, if a vehicle currently displays a vehicle model on the dashboard, and a third vehicle model needs to be displayed on the display screen of the host terminal at this moment, the host terminal can directly acquire the vehicle model displayed on the vehicle dashboard and use the vehicle model as the basic vehicle model.
[0069] Optionally, the host terminal determines one of the multiple historical three-dimensional models as a basic three-dimensional model, and what is determined is a three-dimensional model framework in the basic three-dimensional model. The model attributes need to be determined according to the above embodiment, which will not be repeated here.
[0070] In one embodiment, the host terminal can determine one of the at least one historical three-dimensional models whose model face number is greater than or equal to the target model face number as a basic three-dimensional model. Exemplarily, when there are multiple historical three-dimensional models, the host terminal can determine the model face number of each historical three-dimensional model from multiple historical three-dimensional models, and randomly select one of the historical three-dimensional models whose model face number is greater than or equal to the target model face number as the basic three-dimensional model. For example, taking the vehicle as an example, the host terminal pre-displays historical vehicle model A, historical vehicle model B, and historical vehicle model C. If the model face number of historical vehicle model A is greater than or equal to the target model face number, the host terminal uses historical vehicle model A as the basic vehicle model. For another example, the host terminal pre-displays historical vehicle model A, historical vehicle model B, and historical vehicle model C, and the model face numbers of historical vehicle model A, historical vehicle model B, and historical vehicle model C are all greater than or equal to the target face number, then the host terminal can randomly select one of the three historical vehicle models as the basic vehicle model.
[0071] In another embodiment, the host terminal can determine the face number difference between the number of model faces of each historical three-dimensional model and the number of face faces of the target model; according to the face number difference corresponding to each historical three-dimensional model, determine the one with the smallest face number difference from at least one historical three-dimensional model as the basic three-dimensional model. Exemplarily, taking a vehicle as an example, when there are multiple historical vehicle models, the host terminal pre-displays historical vehicle model A, historical vehicle model B, and historical vehicle model C, and the model face numbers of historical vehicle model A, historical vehicle model B, and historical vehicle model C are all greater than or equal to the target face number, then the host terminal can calculate the face number difference between the model face number of historical vehicle model A, the model face number of historical vehicle model B, and the model face number of historical vehicle model C and the target model face number, and determine the one with the smallest face number difference from the three historical vehicle models as the basic vehicle model.
[0072] In an embodiment of the present application, the host terminal can obtain a basic three-dimensional model from a server; or, if at least one historical three-dimensional model is displayed in advance, a basic three-dimensional model is determined from the at least one historical three-dimensional model. The basic three-dimensional model is pre-stored on the server, and the basic three-dimensional model can be directly obtained on the host terminal, which is conducive to improving the response speed of the host terminal. At the same time, if the target object currently has a historical three-dimensional model displayed in advance, it does not need to be obtained from the server, and a basic three-dimensional model can be directly determined from the historical three-dimensional model, so that the basic three-dimensional model can be quickly obtained, thereby improving the display efficiency of the three-dimensional model.
[0073] Optionally, before displaying the three-dimensional model of the target object, the method further includes: Obtaining the state parameters of the target object that need to be displayed through the three-dimensional model of the target object; The three-dimensional model of the target object is adjusted according to the target object state parameter so that the target object state displayed by the three-dimensional model of the target object corresponds to the target object state parameter.
[0074] The target object state parameter is used to indicate the current state of the target object. Taking a vehicle as an example, it may include but is not limited to the vehicle driving state, door switch state, window switch state, etc.
[0075] Exemplarily, taking a vehicle as an example, for a scene where the first vehicle model needs to be displayed, the vehicle state parameters that need to be displayed through the first vehicle model can be pre-set to include the light switch state, the window switch state, and the door switch state. In the process of displaying the first vehicle model, the host terminal can obtain the light switch state parameter from the controller for controlling the light in the vehicle, obtain the door switch state parameter from the controller for controlling the window in the vehicle, and obtain the window switch state parameter from the controller for controlling the door in the vehicle. Afterwards, according to the obtained light switch state parameter, the state of the light in the target vehicle model is adjusted to a state corresponding to the light switch state parameter, the state of the door in the target vehicle model is adjusted to a state corresponding to the door switch state parameter, and the state of the window in the target vehicle model is adjusted to a state corresponding to the window switch state parameter.
[0076] In the embodiment of the present application, the host terminal can obtain the target state parameters that need to be displayed by the target three-dimensional model at present; and adjust the target three-dimensional model according to the target state parameters, so that the target state displayed by the target three-dimensional model corresponds to the target state parameters. Through this method, the host terminal can adjust the target state displayed by the target three-dimensional model through the target state parameters, which is conducive to the consistency of the target three-dimensional model with the actual target state, and can better reflect the state of the actual target.
[0077] See also Figure 3 , Figure 3 A schematic flow chart of a model display method provided in an embodiment of the present application. The method may include the following steps.
[0078] S301, determining the number of target model faces of the target object three-dimensional model currently required to be displayed.
[0079] S302, determine whether the number of model faces of the basic three-dimensional model is the same as the number of model faces of the target model; if the number of model faces of the basic three-dimensional model is different from the number of model faces of the target model, execute step S303; if the number of model faces of the basic three-dimensional model is the same as the number of model faces of the target model, execute step S304.
[0080] S303, adjusting the initial model framework to obtain a target model framework.
[0081] For example, the host terminal obtains at least one vertex coordinate pre-configured for the three-dimensional model of the target object; wherein each vertex coordinate corresponds to a vertex in the initial model frame; for each vertex, multiple model faces formed by vertices in the initial model frame are merged into one model face to obtain the target model frame.
[0082] S304, taking the initial model framework as the target model framework.
[0083] S305: Render the target model frame to obtain a three-dimensional model of the target object.
[0084] For example, the host terminal can obtain at least one set of model attributes corresponding to the initial model framework, each set of model attributes corresponding to a target object state, and then determine the model attributes of the target object's three-dimensional model from at least one set of model attributes based on the current target object's target object state, and then render the target model framework based on the model attributes of the target object's three-dimensional model to obtain the target object's three-dimensional model.
[0085] S306: Obtain target object state parameters that currently need to be displayed through the target object three-dimensional model.
[0086] S307: Adjust the three-dimensional model of the target object according to the state parameters of the target object.
[0087] The target object three-dimensional model is adjusted according to the target object state parameter so that the target object state displayed by the target object three-dimensional model corresponds to the target object state parameter.
[0088] S308, displaying a three-dimensional model of the target object.
[0089] It should be noted that the achievable methods and technical effects of each step in the embodiments of the present application can refer to the relevant contents in the above embodiments and will not be repeated here.
[0090] See also Figure 4 , Figure 4 It is a structural diagram of a model display device provided in an embodiment of the present application. The model display device can be arranged in a host terminal of a vehicle and can include: a determination module 401, an adjustment module 402 and a display module 403.
[0091] A determination module 401 is used to determine the number of target model faces of the target object three-dimensional model that needs to be displayed currently; An adjustment module 402 is used to adjust the number of model faces of the basic three-dimensional model to obtain a three-dimensional model of the target object if the number of model faces of the basic three-dimensional model is different from the number of model faces of the target model; The display module 403 is used to display the three-dimensional model of the target object.
[0092] Optionally, the basic three-dimensional model includes an initial model frame, and the adjustment module 303 is specifically used to adjust the number of model faces of the initial model frame to obtain a target model frame; wherein the number of model faces of the target model frame is the same as the number of target model faces; the target model frame is rendered according to the model properties of the target object three-dimensional model to obtain the target object three-dimensional model.
[0093] Optionally, the adjustment module 303 is specifically used to obtain at least one vertex coordinate pre-configured for the three-dimensional model of the target object; wherein each vertex coordinate corresponds to a vertex in the initial model frame; for each vertex, multiple model faces formed by vertices in the initial model frame are merged into one model face to obtain the target model frame.
[0094] Optionally, the adjustment module 303 is specifically used to render the target model framework according to the model properties of the target object three-dimensional model to obtain at least one set of model properties corresponding to the initial model framework before obtaining the target object three-dimensional model; wherein each set of model properties corresponds to a target object state; and according to the current target object state, determine the model properties of the target object three-dimensional model from at least one set of model properties.
[0095] Optionally, the acquisition module 302 is specifically configured to acquire the basic 3D model from the server before adjusting the number of model faces of the basic 3D model; or, if at least one historical 3D model is displayed in advance, determine one of the at least one historical 3D model as the basic 3D model.
[0096] Optionally, the acquisition module 302 is specifically used to determine a basic three-dimensional model from at least one historical three-dimensional model whose number of model faces is greater than or equal to the target number of faces; or, determine the face number difference between the number of model faces of each historical three-dimensional model and the number of faces of the target model; based on the face number difference corresponding to each historical three-dimensional model, determine the one with the smallest corresponding face number difference from at least one historical three-dimensional model as the basic three-dimensional model.
[0097] Optionally, the display module 304 is specifically used to obtain the target state parameters that need to be displayed through the target three-dimensional model before displaying the target three-dimensional model; adjust the target three-dimensional model according to the target state parameters so that the target state displayed by the target three-dimensional model corresponds to the target state parameters.
[0098] The model display device provided in this embodiment can execute the above method embodiment, and its implementation principle and technical effect are similar, which will not be repeated here.
[0099] See also Figure 5 , Figure 5 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application.
[0100] For example, Figure 5 As shown, the electronic device 500 includes: a memory 501 and a processor 502, wherein the memory 501 stores an executable program code 5011, and the processor 502 is used to call and execute the executable program code 5011 to perform a model display method.
[0101] It should be noted that the electronic device may be a host terminal in a vehicle.
[0102] This embodiment also provides a readable storage medium, which stores executable program code. When the executable program code product runs on a computer, the computer executes the above-mentioned related method steps to implement a model display method provided in the above embodiment.
[0103] This embodiment also provides an executable program code product. When the executable program code product runs on a computer, the computer is enabled to execute the above-mentioned related steps to implement a model display method provided by the above embodiment.
[0104] Among them, the device, readable storage medium, executable program code product or chip provided in this embodiment are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods provided above, and will not be repeated here.
[0105] Through the description of the above implementation methods, technical personnel in the relevant field can understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0106] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, 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 interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0107] The above contents are only specific implementation methods of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A model display method, characterized in that: The method comprises: Determine the number of target model faces of the target object three-dimensional model that needs to be displayed currently; If the number of model faces of the basic three-dimensional model is different from the number of model faces of the target model, the number of model faces of the basic three-dimensional model is adjusted to obtain the three-dimensional model of the target object; The three-dimensional model of the target object is displayed.
2. The method according to claim 1, characterized in that: The basic three-dimensional model includes an initial model framework, and the number of model faces of the basic three-dimensional model is adjusted to obtain a three-dimensional model of the target object, including: The number of model faces of the initial model framework is adjusted to obtain a target model framework; wherein the number of model faces of the target model framework is the same as the number of model faces of the target model; The target model framework is rendered according to the model attributes of the target object three-dimensional model to obtain the target object three-dimensional model.
3. The method according to claim 2, characterized in that The step of adjusting the number of model faces of the initial model frame to obtain a target model frame includes: Acquire at least one vertex coordinate pre-configured for the three-dimensional model of the target object; wherein each of the vertex coordinates corresponds to a vertex in the initial model frame; For each of the vertices, a plurality of model surfaces formed by the vertices in the initial model frame are merged into one model surface to obtain the target model frame.
4. The method according to claim 2, characterized in that Before rendering the target model framework according to the model attributes of the target object three-dimensional model to obtain the target object three-dimensional model, the method further includes: Acquire at least one set of model attributes corresponding to the initial model framework; wherein each set of model attributes corresponds to a target object state; According to a current target state of the target, model attributes of the three-dimensional model of the target are determined from the at least one set of model attributes.
5. The method according to claim 1, characterized in that: Before adjusting the number of model faces of the basic three-dimensional model, the method further includes: Acquire the basic three-dimensional model from the server; Alternatively, if at least one historical three-dimensional model is displayed in advance, one of the at least one historical three-dimensional model is determined as the basic three-dimensional model.
6. The method according to claim 5, characterized in that The step of determining one of the at least one historical three-dimensional model as the basic three-dimensional model comprises: Determine, from the at least one historical three-dimensional model, one whose number of model faces is greater than or equal to the number of faces of the target model as the basic three-dimensional model; Alternatively, the face number difference between each of the historical three-dimensional models and the target model is determined; based on the face number difference corresponding to each of the historical three-dimensional models, the one with the smallest corresponding face number difference is determined from the at least one historical three-dimensional model as the basic three-dimensional model.
7. The method according to any one of claims 1 to 6, characterized in that Before displaying the three-dimensional model of the target object, the method further includes: Acquire target object state parameters that currently need to be displayed through the target object three-dimensional model; The target object three-dimensional model is adjusted according to the target object state parameter so that the target object state displayed by the target object three-dimensional model corresponds to the target object state parameter.
8. A model display device, characterized in that: The device comprises: A determination module, used to determine the number of target model faces of the target object three-dimensional model currently required to be displayed; an adjustment module, configured to adjust the number of model faces of the basic three-dimensional model to obtain the three-dimensional model of the target object if the number of model faces of the basic three-dimensional model is different from the number of model faces of the target model; The display module is used to display the three-dimensional model of the target object.
9. An electronic device, characterized in that: The electronic device comprises: A memory for storing executable program codes; A processor, configured to call and run the executable program code from the memory, so that the electronic device executes the method according to any one of claims 1 to 7.
10. A readable storage medium, characterized in that: The readable storage medium stores executable program codes, and when the executable program codes are executed, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Method and device for processing mesh model
CN109461198A
Model manufacturing method and device based on LOD, storage medium and electronic equipment
CN109960887A
Three-dimensional car model data processing method and device, equipment and medium
CN118196266A
Three-dimensional false car model generation method and device and storage medium
CN118709300A
Image rendering method and apparatus, device, and medium
US20240212282A1