Three-dimensional car model display method and system, vehicle-mounted terminal and storage medium
By pre-generating a set of 3D car model images and displaying them using placeholder images, the initialization delay of the 3D car model display engine was resolved, achieving high-quality seamless switching and improving the user experience.
Patent Information
- Application Number
- CN202410927187.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-11
- Publication Date
- 2024-11-08
AI Technical Summary
In existing technologies, the initialization delay of the 3D car model display engine causes the central control interface to fail to immediately display the 3D car model, resulting in a sense of waiting and a disconnect in the user experience.
By pre-generating a set of 3D car model images, displaying them using placeholder images, and seamlessly switching them after rendering, engine initialization delays are avoided. Preloading and image hiding methods are used to ensure high-quality display.
It eliminates user waiting time, enhances the user's visual experience, and achieves efficient and seamless switching of 3D car model displays.
Smart Images

Figure CN118918232A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of three-dimensional vehicle model display, and in particular to a three-dimensional vehicle model display method, system, vehicle-mounted terminal and storage medium. Background Art
[0002] In the context of the rapid development of new energy vehicle technology, intelligence and networking have become important trends in the automotive industry. As the pioneer of this trend, electric vehicles are particularly eye-catching for their internal intelligent configuration. Among them, the central control screen, as the core interface of human-computer interaction, carries functions such as displaying vehicle status, navigation information, and multimedia entertainment, which is crucial to improving the driving experience. In order to further enhance the user's sense of immersion and the intuitiveness of vehicle information, many electric vehicles have integrated 3D (3-dimensional) car model display functions. Through highly realistic 3D models, they can reflect the vehicle's operating status in real time, such as battery power, door switch status, tire pressure, etc., and can also realize virtual vehicle control demonstrations, greatly enriching the interactivity of the user interface and the efficiency of information transmission.
[0003] In related technologies, in order to realize the smooth display of 3D car models on the central control screen, mature 3D graphics engines such as Unity (game engine), Unreal Engine or Cesium (geographic information system engine) are currently commonly used. However, although these engines are powerful and can build a delicate and realistic virtual environment, they all face a common technical challenge when they are first started, that is, the initialization time is long. During this initialization period, the central control interface may not be able to display the 3D car model immediately, but instead display a blank or loading animation. In the modern car cockpit environment that pursues seamless connection and instant feedback, it brings a certain degree of waiting and experience discontinuity to users. Summary of the invention
[0004] In view of the above-mentioned shortcomings of the prior art, the present application discloses a three-dimensional car model display method, system, vehicle-mounted terminal and storage medium, which are used to solve the technical problem of delay in the display of the three-dimensional car model during engine initialization in the prior art.
[0005] In a first aspect, the present application provides a three-dimensional vehicle model display method, the method comprising: in response to a vehicle model display request, obtaining current configuration information and a three-dimensional vehicle model image set of the vehicle, wherein the vehicle model display request carries vehicle model type information; determining a target three-dimensional vehicle model based on the configuration information and the vehicle model type information, and matching a target vehicle model image from the three-dimensional vehicle model image set; initializing a three-dimensional engine, and performing a first rendering of the target three-dimensional vehicle model, and at the same time, displaying the target vehicle model image as a placeholder in a three-dimensional vehicle model interface; if it is monitored that the first rendering is completed, switching the three-dimensional vehicle model interface from the target vehicle model image to a first rendering screen.
[0006] In one embodiment of the present application, matching a target vehicle model image from the three-dimensional vehicle model image set includes: determining a target vehicle model type according to the vehicle model type information, wherein the target vehicle model type is any one of a physical vehicle model, an energy vehicle model and a transparent vehicle model, the physical vehicle model is displayed on a vehicle control page, the energy vehicle model is displayed on a vehicle energy management page, and the transparent vehicle model is displayed on a vehicle status page; matching a corresponding image subset from the three-dimensional vehicle model image set according to the target vehicle model type; matching the target vehicle model image from the image subset according to the configuration information, wherein the configuration information includes paint information, interior information and wheel information.
[0007] In one embodiment of the present application, matching a corresponding image subset from the three-dimensional vehicle model image set according to the target vehicle model type includes: determining whether the target vehicle model type is the physical vehicle model; if the target vehicle model type is the physical vehicle model, determining a display mode of the physical vehicle model based on current light intensity, wherein the display mode includes a day mode and a night mode; if the display mode is the day mode, matching a corresponding day image subset from the three-dimensional vehicle model image set; if the display mode is the night mode, matching a corresponding night image subset from the three-dimensional vehicle model image set.
[0008] In one embodiment of the present application, switching the three-dimensional car model interface from the target car model picture to the first rendering picture includes: preloading the first rendering picture and listening for a switching signal, wherein the switching signal is automatically generated after the first rendering is completed; in response to the switching signal, calling a pre-built image hiding method to hide the target car model picture, and popping up the first rendering picture while the target car model image is hidden.
[0009] In one embodiment of the present application, after switching the three-dimensional car model interface from the target car model image to the first rendering screen, it also includes: before cutting out the three-dimensional car model interface, based on the current state of the vehicle, dynamically taking a screenshot of the state of the target three-dimensional car model to obtain a three-dimensional car model dynamic image; when cutting into the three-dimensional car model interface, performing a second rendering of the target three-dimensional car model in the current state, and at the same time, displaying the three-dimensional car model dynamic image as a placeholder in the three-dimensional car model interface; if it is monitored that the second rendering is completed, switching the three-dimensional car model interface from the three-dimensional car model dynamic image to the second rendering interface.
[0010] In one embodiment of the present application, a method for determining whether the first rendering and the second rendering are completed includes: obtaining a back buffer layer of the target three-dimensional vehicle model during the rendering process to generate a bitmap image; determining a target pixel point from the bitmap image according to a preset pixel point area, and extracting a pixel value of the target pixel point; matching the pixel value with a preset pixel threshold, and determining whether the rendering is completed based on the matching result.
[0011] In one embodiment of the present application, the generation of the three-dimensional car model image set includes: rendering and displaying various three-dimensional car models in sequence according to different combinations of various car model types and various configuration information, and taking screenshots of the display results; cropping the three-dimensional car model in each screenshot according to a preset three-dimensional car model size to obtain a three-dimensional car model image; classifying and naming each of the three-dimensional car model images according to their corresponding car model types and configuration information, and compressing each of the three-dimensional car model images to obtain multiple image subsets; generating the three-dimensional car model image set based on the multiple image subsets.
[0012] In a second aspect, the present application provides a three-dimensional car model display system, the system comprising: an acquisition module, for obtaining the current configuration information and three-dimensional car model image set of the vehicle in response to a car model display request, wherein the car model display request carries car model type information; a determination module, for determining a target three-dimensional car model based on the configuration information and the car model type information, and matching a target car model image from the three-dimensional car model image set; a display module, for initializing a three-dimensional engine, and performing a first rendering of the target three-dimensional car model, and at the same time, displaying the target car model image as a placeholder in a three-dimensional car model interface; a switching module, for switching the three-dimensional car model interface from the target car model image to the first rendering screen if it is detected that the first rendering is completed.
[0013] In a third aspect, the present application provides a vehicle-mounted terminal, comprising: one or more processors; a storage device for storing one or more programs, when the one or more programs are executed by one or more processors, the electronic device implements the three-dimensional vehicle model display method described in the first aspect.
[0014] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor of a computer, the computer executes the three-dimensional vehicle model display method described in the first aspect.
[0015] As described above, the three-dimensional vehicle model display method, system, vehicle terminal and storage medium provided by the embodiments of the present application have the following beneficial effects:
[0016] First, a vehicle model display request is responded to, and the current configuration information of the vehicle and a three-dimensional vehicle model image set are obtained. The vehicle model display request carries vehicle model type information, and the target three-dimensional vehicle model is determined according to the configuration information and the vehicle model type information, and the target vehicle model image is matched from the three-dimensional vehicle model image set. Then, the three-dimensional engine is initialized, and the first rendering of the target three-dimensional vehicle model is performed. At the same time, the target vehicle model image is displayed as a placeholder in the three-dimensional vehicle model interface. Finally, if the first rendering is detected to be completed, the three-dimensional vehicle model interface is switched from the target vehicle model image to the first rendering screen. When the engine is initialized and the vehicle model is rendered, the placeholder is displayed to avoid the delay in the display of the three-dimensional vehicle model due to the engine initialization and the waiting time when the vehicle model is loaded, thereby eliminating the waiting time of the user. The placeholder is a singleton screenshot of the three-dimensional vehicle model, thereby ensuring high-quality display effects. After the vehicle model rendering is completed, the placeholder and the rendering screen are seamlessly switched, thereby improving the user's visual experience.
[0017] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The drawings herein are incorporated into the specification and constitute a part of the specification, showing embodiments consistent with the present application, and together with the specification, are used to explain the principles of the present application. Obviously, the drawings described below are only some embodiments of the present application, and for those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative work. In the drawings:
[0019] Figure 1 is a schematic diagram of an implementation environment of a three-dimensional vehicle model display system shown in an exemplary embodiment of the present application;
[0020] Figure 2 is a flow chart of a three-dimensional car model display method shown in an exemplary embodiment of the present application;
[0021] Figure 3 is a flowchart of a specific three-dimensional car model display method shown in an exemplary embodiment of the present application;
[0022] Figure 4 is a flow chart of a method for displaying a three-dimensional car model when entering a three-dimensional car model interface, shown in an exemplary embodiment of the present application;
[0023] Figure 5 is a block diagram of a three-dimensional car model display system shown in an exemplary embodiment of the present application;
[0024] Figure 6 It is a structural schematic diagram of a vehicle-mounted terminal provided in one embodiment of the present application. DETAILED DESCRIPTION
[0025] The following will describe the implementation methods of the present application with reference to the accompanying drawings and preferred embodiments. Those skilled in the art can easily understand other advantages and effects of the present application from the contents disclosed in this specification. The present application can also be implemented or applied through other different specific implementation methods, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present application. It should be understood that the preferred embodiments are only for illustrating the present application, not for limiting the scope of protection of the present application.
[0026] It should be noted that the illustrations provided in the following embodiments are only used to illustrate the basic concept of the present application in a schematic manner, and therefore the illustrations only show components related to the present application rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed arbitrarily, and the component layout may also be more complicated.
[0027] In the following description, a large number of details are discussed to provide a more thorough explanation of the embodiments of the present application. However, it is obvious to those skilled in the art that the embodiments of the present application can be implemented without these specific details. In other embodiments, well-known structures and devices are shown in the form of block diagrams rather than in detail to avoid making the embodiments of the present application difficult to understand.
[0028] Currently, 3D graphics engines such as Unity, Unreal Engine or Cesium are commonly used to display 3D car models on the vehicle's central control screen. However, the inventors of the present application have found that although these engines are powerful and can build a delicate and realistic virtual environment, they all face a common technical challenge when they are first started, namely, the long initialization time. During this initialization period, the central control interface may not be able to display the 3D car model immediately, but instead display a blank or loading animation. In the modern car cockpit environment that pursues seamless connection and instant feedback, this brings a certain degree of waiting and experience gap to users.
[0029] Therefore, see Figure 1 , Figure 1 FIG. 1 is a schematic diagram of an implementation environment of a three-dimensional vehicle model display system shown in an exemplary embodiment of the present application. Figure 1 As shown, the implementation environment includes a vehicle 110 and a three-dimensional car model display system 120, wherein the three-dimensional car model display system 120 is embedded in the vehicle 110, and is used to realize the display control of the three-dimensional car model in the vehicle 110. The three-dimensional car model display system 120 includes but is not limited to a vehicle system, a vehicle-mounted computer, etc. During engine initialization and car model rendering, a placeholder image is displayed to avoid delays in the three-dimensional car model display due to engine initialization and waiting when the car model is loaded, thereby eliminating the user's waiting time. The placeholder image is a single instance screenshot of the three-dimensional car model, thereby ensuring high-quality display effects, and seamless switching between the placeholder image and the rendering screen is performed after the car model rendering is completed, thereby enhancing the user's visual experience.
[0030] See also Figure 2 , Figure 2 is a flowchart of a three-dimensional car model display method shown in an exemplary embodiment of the present application. The method can be applied to Figure 1 The implementation environment shown is a schematic diagram. It should be understood that the method may also be applicable to other exemplary implementation environments, and this embodiment does not limit the implementation environment to which the method is applicable.
[0031] like Figure 2 As shown, in an exemplary embodiment, the three-dimensional car model display method includes at least steps S210 to S240, which are described in detail as follows:
[0032] Step S210, in response to a vehicle model display request, obtaining current configuration information of the vehicle and a three-dimensional vehicle model image set, wherein the vehicle model display request carries vehicle model type information.
[0033] It should be noted that the user can operate based on the 3D car model display function and issue a car model display request. The car model display request carries car model type information, which represents the type of car model the user wants to display. The car model types include physical car models, energy car models and transparent car models. Among them, the physical car model is displayed on the vehicle control page, the energy car model is displayed on the vehicle energy management page, and the transparent car model is displayed on the vehicle status page.
[0034] It should also be noted that on the vehicle control page, the physical car model can display the physical status of the vehicle, such as whether the doors, windows, and tailgate are closed, whether the lights are on, etc.; on the vehicle energy management page, the energy car model can display the vehicle's energy flow and usage, such as the battery's charging and discharging status, the working status of the generator or engine, and the working status of the energy recovery system; on the vehicle status page, the transparent car model can display the vehicle's health status, such as tire pressure, tire wear, brake pad thickness and engine oil level, etc.
[0035] In addition, after receiving the car model display request, it is necessary to determine whether it is the first time to start the 3D engine. If it is the first time, it indicates that the 3D engine needs to be initialized, and then the current configuration information of the vehicle and the 3D car model image set are obtained.
[0036] In one embodiment, generation of a three-dimensional car model image set includes: rendering and displaying various three-dimensional car models in sequence according to different combinations of various car model types and various configuration information, and taking screenshots of the display results; cropping the three-dimensional car model in each screenshot according to a preset three-dimensional car model size to obtain a three-dimensional car model image; classifying and naming each three-dimensional car model image according to the corresponding car model type and configuration information, and compressing each three-dimensional car model image to obtain multiple image subsets; generating a three-dimensional car model image set based on the multiple image subsets.
[0037] Among them, the configuration information includes paint information, interior information and wheel information, which respectively represent the vehicle model color style, interior configuration style and wheel style; the screenshot of the display result is a screenshot of the size of the entire central control screen; the three-dimensional car model size refers to the size of the three-dimensional car model displayed on the central control screen.
[0038] In addition, various car model types and various configuration information are combined in different ways to obtain various three-dimensional car models. For example, a combination of a black car model style, a specific interior configuration style, and a specific wheel style under a physical car model is a three-dimensional car model. According to the corresponding car model type and configuration information, each three-dimensional car model image is classified and named, that is, all the obtained three-dimensional car model images are classified according to the car model type, and each three-dimensional car model image in each category is named and compressed.
[0039] In this embodiment, screenshots are taken of three-dimensional car models in different combinations of various car model types and various configuration information in advance to generate a three-dimensional car model image set, that is, screenshots are taken separately according to the car paint, interior, wheels, day and night, solid car models, energy car models, and transparent car models. In this way, in various scenarios where three-dimensional car models need to be displayed, it can be ensured that the corresponding three-dimensional car model images are matched.
[0040] In a possible embodiment, for each type of car model, according to the configuration of the car model, the configuration of the car paint, interior, and wheel hub is automatically called in sequence based on a preset time interval and passed to the 3D engine for rendering; when the engine switches the configuration and rendering is completed once, the screenshot function is called to capture the image. Figure 1 times until all configuration combinations are rendered; after the full-screen screenshot is completed, a partial screenshot of the car model is taken according to the car model size given in the UI (User Interface), and it is named according to the car paint, interior, and wheel names, such as car_carpatint_0_heiricot_0_whell_0; the three-dimensional car model image is compressed using image compression technology (such as Bitmap compression) and exported in webp format (i.e. image file format); the car model is classified according to the type, and each type of collection is named and saved in the storage space (such as the energy car model is named energy or battery); all images are exported in the hardware and placed in the resource file of the working project for subsequent retrieval when the engine is initialized and the car model is rendered.
[0041] As a possible implementation example, the use of image compression technology can reduce the storage space occupied by images, improve application performance, and export images to webp format. This can provide efficient image compression and fast loading speed, support lossless compression, and ensure the quality of the compressed and exported three-dimensional car model image, thereby ensuring a seamless effect when switching from a three-dimensional car model image to a rendered image.
[0042] Step S220, determining a target three-dimensional vehicle model according to the configuration information and the vehicle model type information, and matching a target vehicle model image from the three-dimensional vehicle model image set.
[0043] In an embodiment of the present application, after the configuration information and the vehicle model type information are obtained, the three-dimensional vehicle model that needs to be rendered currently, that is, the target three-dimensional vehicle model, is determined based on the configuration information and the vehicle model type information; and according to the configuration information and the vehicle model type information, a three-dimensional vehicle model image that is consistent with the target three-dimensional vehicle model is matched from the three-dimensional vehicle model image set, that is, the target vehicle model image, thereby ensuring the consistency of the three-dimensional vehicle model image with the current target three-dimensional vehicle model.
[0044] In one embodiment, matching a target vehicle model image from a three-dimensional vehicle model image set includes: determining the target vehicle model type according to vehicle model type information, the target vehicle model type being any one of a physical vehicle model, an energy vehicle model, and a transparent vehicle model; matching a corresponding image subset from the three-dimensional vehicle model image set according to the target vehicle model type; and matching the target vehicle model image from the image subset according to the configuration information.
[0045] In this embodiment, the image subset under the name of the target car model type may be matched from the three-dimensional car model image set; the target car model image may be matched from the image subset according to the configuration information, that is, the name of the required three-dimensional car model image may be determined according to the configuration information, and the corresponding image may be matched from the image subset according to the name. In the manner of matching the target car model image according to the car model type and the configuration information, the consistency of the three-dimensional car model image and the current target three-dimensional car model is ensured.
[0046] Furthermore, according to the target car model type, a corresponding image subset is matched from the three-dimensional car model image set, including: judging whether the target car model type is a physical car model; if the target car model type is a physical car model, judging the display mode of the physical car model based on the current light intensity, wherein the display mode includes a day mode and a night mode; if the display mode is a day mode, matching a corresponding day image subset from the three-dimensional car model image set; if the display mode is a night mode, matching a corresponding night image subset from the three-dimensional car model image set.
[0047] In this embodiment, considering that the physical car model displays vehicle states such as whether the doors, windows, and tailgate are closed, and whether the lights are turned on, in order to clearly display the state details, the brightness of the rendered three-dimensional car model will be different based on different lighting conditions. For example, it is darker when the light is strong and brighter when the light is weak. Therefore, for the physical car model, the corresponding three-dimensional car model picture is divided into a daytime image subset and a daytime image subset according to the light intensity. In the daytime image subset and the daytime image subset, the three-dimensional car model pictures under the same configuration information are named the same, but the brightness of the two is different. In this way, when the user needs to display the physical car model, the corresponding three-dimensional car model picture can be retrieved based on the real-time light intensity, which further ensures the consistency of the three-dimensional car model image with the current target three-dimensional car model and improves the user experience.
[0048] Step S230, initializing the 3D engine and performing the first rendering of the target 3D car model. At the same time, the target car model image is displayed as a placeholder in the 3D car model interface.
[0049] Among them, the placeholder is an image used to temporarily fill the content position. When the final image, text or other media content is not yet ready, the placeholder can be used as a temporary substitute. When the actual content is ready, the placeholder will be hidden.
[0050] In an embodiment of the present application, the matched target car model image is used as a placeholder to replace the unrendered three-dimensional car model for display. In this way, the delay in the display of the three-dimensional car model due to engine initialization and the waiting time when the car model is loaded are effectively avoided, thereby eliminating the user's waiting time.
[0051] Step S240: if it is detected that the first rendering is completed, the three-dimensional car model interface is switched from the target car model image to the first rendering screen.
[0052] During the car model rendering, the rendering progress will be continuously monitored. Only when the rendering is completed will the 3D car model interface be switched from the target car model image to the rendering screen to avoid the situation where the rendering screen does not pop up after the 3D car model interface is removed. In addition, the target car model image is consistent with the pop-up rendering screen, avoiding the visual mutation caused by the switch and improving the user experience.
[0053] In one embodiment, the three-dimensional car model interface is switched from a target car model image to a first rendering image, including: preloading the first rendering image and listening for a switching signal, wherein the switching signal is automatically generated after the first rendering is completed; in response to the switching signal, a pre-built image hiding method is called to hide the target car model image, and while the target car model image is hidden, the first rendering image pops up.
[0054] Among them, the image hiding method, such as Alpha blending (ie, transparency blending), hides the target car model image by adjusting the transparency of the target car model image to achieve a smooth transition with the first rendering image.
[0055] In this embodiment, by monitoring the switching signal, under the time factor, combined with the preloading technology and the picture hiding method, the target car model image and the first rendering picture are switched, ensuring seamless switching between the two, so as to achieve an effect that the user cannot detect, thereby improving the user's 3D car model experience.
[0056] In one embodiment, after the three-dimensional car model interface is switched from the target car model image to the first rendering screen, it also includes: before cutting out the three-dimensional car model interface, based on the current state of the vehicle, dynamically screenshot the state of the target three-dimensional car model to obtain a three-dimensional car model dynamic image; when cutting into the three-dimensional car model interface, performing a second rendering of the target three-dimensional car model in the current state, and at the same time, displaying the three-dimensional car model dynamic image as a placeholder in the three-dimensional car model interface; if it is monitored that the second rendering is completed, the three-dimensional car model interface is switched from the three-dimensional car model dynamic image to the second rendering interface.
[0057] It should be noted that when the 3D car model display function is started for the first time, the 3D engine needs to be initialized, but when the 3D car model interface is cut out and cut in subsequently, the 3D engine does not need to be initialized again, that is, after the 3D engine is initialized, the engine initialization components are saved in a singleton, and when the 3D car model display function is hot-started subsequently, the 3D engine is directly used to render the 3D car model. In addition, when the 3D car model display function is started for the first time, it is a cold start, and the 3D car model rendered at this time is static. Therefore, the above-mentioned 3D car model image set is also static, and when the 3D car model interface is cut out and cut in subsequently, it is a hot start, and the 3D car model rendered at this time is dynamic, that is, the current state of the 3D car model may be the door is open, the window is open, the light is on, the car model is rotating, the current battery status and tire pressure status, etc.
[0058] Taking into account that the vehicle is displayed dynamically, when the three-dimensional car model interface is cut in again, the placeholder image that needs to be displayed can be consistent with the angle, state, etc. of the car model in the current state, that is, there is no deviation between the image displayed by the placeholder image and the image displayed dynamically in 3D. In an embodiment of the present application, before cutting out the three-dimensional car model interface, based on the current state of the vehicle, a dynamic screenshot of the state of the target three-dimensional car model is first taken to obtain a dynamic image of the three-dimensional car model, so that when the three-dimensional car model interface is cut in, when the second rendering of the target three-dimensional car model in the current state is performed, the dynamic image of the three-dimensional car model is displayed as a placeholder in the three-dimensional car model interface. After monitoring that the second rendering is completed, the three-dimensional car model interface is switched from the three-dimensional car model dynamic image to the second rendering interface. In this way, the dynamic screenshot can completely match the state of the current car model. When cutting in the interface, the user waiting time is eliminated, and the state of the placeholder image and the 3D display are made consistent, thereby enhancing the user experience.
[0059] Take the example of switching from the 3D car model interface to the central control screen homepage, and then switching from the homepage to the 3D car model interface. When switching from the 3D car model interface to the central control screen homepage, before the onStop (that is, called when the Activity is completely invisible, which means that the current Activity is completely covered by another Activity or the application has retreated to the background) life cycle of the Activity (representing a screen interface, which is the main entry point for users to interact with the application, and each Activity is usually responsible for displaying a separate screen), the SurfaceView (that is, surface view) of the 3D engine is called, and the requestBuffer method (that is, a function used to request a buffer to store pixel data, and copy pixel data to a target buffer) of PixelCopy (that is, pixel copy component) is used to take a dynamic screenshot of the current car model state, generating a screenshot of the SurfaceView (that is, surface view) of the 3D engine. The current state of the car model may be that the door is open, the window is open, the light is on, the car model is rotating, the battery is currently in the state, the tire pressure is in the state, etc. There are many states. For example, the rotation angle can be from 0 to 360 degrees. The dynamic screenshot can completely match the current state of the car model. When the 3D car model interface is cut into the home page, in onStart (a callback method in the Activity life cycle, when the Activity becomes visible to the user, that is, from an invisible state to a visible state, the system will call this method), it is determined whether there is a corresponding dynamic screenshot. If so, the dynamic screenshot is displayed. If not, the corresponding static screenshot in the previous 3D car model image set is displayed. After the 3D engine re-renders the 3D car model, the screenshot is hidden and the rendering screen is popped up.
[0060] Because the screenshot and the car model status are dynamically matched, hiding can achieve seamless switching, and users cannot tell whether it is a screenshot or a car model. When the rendering is completed, the user can operate the car model, and the car model can also respond to various signals in real time to display the latest status.
[0061] In one embodiment, a method for determining whether the first rendering and the second rendering are completed includes: obtaining a back buffer layer of the target three-dimensional vehicle model during the rendering process to generate a bitmap image; determining the target pixel point from the bitmap image according to a preset pixel point area, and extracting the pixel value of the target pixel point; matching the pixel value with a preset pixel threshold, and determining whether the rendering is completed based on the matching result.
[0062] It should be noted that when the 3D engine is initialized, the 3D engine notifies the client to be compatible with the rendering error of the 3D engine. For example, the 3D engine is initialized, but the 3D car model is not actually rendered, or the file cache cannot be generated, and the engine cannot render the car model. At this time, the rendering screen cannot pop up normally, and the placeholder image needs to be displayed all the time. Therefore, it is necessary to first determine whether the rendering is completed, and then switch between the image and the rendering screen after the rendering is completed. In this way, the problem of rendering black screen and screen flickering can be avoided.
[0063] In addition, in the embodiment of the present application, the judgment logic for whether the first rendering is completed and the second rendering is completed is the same.
[0064] In this embodiment, the image sampling detection technology is used to obtain the back buffer layer of the target three-dimensional car model during the rendering process, that is, the layer of the SurfaceView provided by the three-dimensional engine, generate a bitmap image (i.e., a bitmap image), and then determine the target pixel point from the bitmap image according to the preset pixel point area, use OpenCV (i.e., an open source computer vision library) to extract the pixel value of the target pixel point, and finally match the pixel value with the preset pixel threshold, and judge whether the rendering is completed according to the matching result. If the rendering is not successful, the placeholder image is always used for display. In this way, the image sampling detection technology is used to judge whether the rendering is completed, which ensures the reliability of the judgment result.
[0065] It should also be noted that the preset pixel point area can be the body area, window area, interior area, and wheel area, etc. There are multiple target pixel points, and the multiple target pixel points can be from the same pixel point area or from different pixel point areas. In this way, the reliability of the judgment result can be further enhanced; in addition, the pixel threshold is set according to the specific area and configuration. When performing pixel matching, the pixel value of the corresponding area is matched with the pixel threshold to ensure the reliability of the matching result. Whether the rendering is completed is determined based on the matching result, that is, if each pixel point is matched successfully, the rendering is determined to be completed, and if at least one pixel point fails to match, the rendering is determined to be failed.
[0066] See also Figure 3 , Figure 3 FIG. 1 is a flowchart of a specific three-dimensional vehicle model display method shown in an exemplary embodiment of the present application. Figure 3As shown, first, the 3D car model display function is started based on the user operation, and the 3D engine is initialized; then the display page selected by the user is determined; it is determined whether the display page is a vehicle control page, a vehicle energy management page or a vehicle status page; after the display page is determined, whether the initialization of the 3D engine is completed; if the initialization is not completed, the placeholder image of the corresponding type of the page is loaded, and the initialization of the 3D engine is continued until the initialization is completed; if the initialization is completed, the 3D car model is rendered; then it is determined whether the 3D car model is rendered; if the rendering is not completed, the placeholder image continues to be displayed, and the 3D car model is continued to be rendered until the 3D car model is rendered; if the rendering is completed, the placeholder image is hidden, and at the same time, the rendering screen pops up.
[0067] See also Figure 4 , Figure 4 FIG. 1 is a flowchart of a method for displaying a three-dimensional car model when entering a three-dimensional car model interface, shown in an exemplary embodiment of the present application. Figure 4 As shown, firstly, the 3D car model display function is entered based on the user operation; then the display page selected by the user is determined; it is determined whether the display page is a vehicle control page, a vehicle energy management page or a vehicle status page; after determining the display page, it is determined whether there is a 3D car model dynamic image; if not, a static screenshot is displayed; if so, a dynamic screenshot is displayed; after the 3D car model rendering is completed, the screenshot is hidden, and at the same time, a rendering screen pops up.
[0068] The above-mentioned three-dimensional car model display method first responds to a car model display request, obtains the current configuration information of the vehicle and a three-dimensional car model image set, the car model display request carries car model type information, and determines the target three-dimensional car model according to the configuration information and the car model type information, and matches the target car model image from the three-dimensional car model image set, then initializes the three-dimensional engine, and performs the first rendering of the target three-dimensional car model. At the same time, the target car model image is displayed as a placeholder in the three-dimensional car model interface. Finally, if the first rendering is monitored to be completed, the three-dimensional car model interface is switched from the target car model image to the first rendering screen. When the engine is initialized and the car model is rendered, the placeholder is displayed to avoid the delay in the engine initialization for the three-dimensional car model display and the waiting time when the car model is loaded, thereby eliminating the user's waiting time. The placeholder is a single screenshot of the three-dimensional car model, which ensures high-quality display effects, and seamless switching between the placeholder and the rendering screen is performed after the car model rendering is completed, thereby improving the user's visual experience.
[0069] See also Figure 5 , Figure 5 is a block diagram of a three-dimensional car model display system shown in an exemplary embodiment of the present application. The system can be applied to Figure 1The implementation environment shown is a schematic diagram. It should be understood that the system may also be applicable to other exemplary implementation environments, and this embodiment does not limit the implementation environment to which the system is applicable.
[0070] like Figure 5 As shown, in an exemplary embodiment, the three-dimensional car model display system 500 includes at least an acquisition module 510, a determination module 520, a display module 530 and a switching module 550, which are described in detail as follows:
[0071] The acquisition module 510 is used to obtain the current configuration information of the vehicle and the three-dimensional vehicle model image set in response to the vehicle model display request, wherein the vehicle model display request carries the vehicle model type information;
[0072] The determination module 520 determines the target three-dimensional vehicle model according to the configuration information and the vehicle model type information, and matches the target vehicle model image from the three-dimensional vehicle model image set;
[0073] The display module 530 is used to initialize the 3D engine and perform the first rendering of the target 3D car model, and at the same time, display the target car model image as a placeholder in the 3D car model interface;
[0074] The switching module 540 is used to switch the three-dimensional car model interface from the target car model image to the first rendering screen if it is detected that the first rendering is completed.
[0075] It should be noted that the three-dimensional car model display system provided in the above embodiment and the three-dimensional car model display method provided in the above embodiment belong to the same concept, wherein the contents of the operations performed by each module have been described in detail in the method embodiment and will not be repeated here.
[0076] See also Figure 6 , Figure 6 It is a structural schematic diagram of a vehicle-mounted terminal provided in one embodiment of the present application. Figure 6 The structure diagram of the computer system of the vehicle terminal suitable for implementing the embodiment of the present application is shown. It should be noted that: Figure 6 The computer system 600 of the vehicle-mounted terminal shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0077] like Figure 6As shown, the computer system 600 includes a central processing unit (CPU) 601, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 602 or the program loaded from the storage part 608 to the random access memory (RAM) 603, such as executing the method in the above embodiment. In the RAM 603, various programs and data required for system operation are also stored. The CPU 601, the ROM 602 and the RAM 603 are connected to each other through the bus 604. The input / output (I / O) interface 605 is also connected to the bus 604.
[0078] The following components are connected to the I / O interface 605: an input section 606 including a keyboard, a mouse, etc.; an output section 607 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 608 including a hard disk, etc.; and a communication section 609 including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication section 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to the I / O interface 605 as needed. A removable medium 611, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 610 as needed so that a computer program read therefrom is installed into the storage section 608 as needed.
[0079] In particular, according to an embodiment of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a computer program for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication section 609, and / or installed from a removable medium 611. When the computer program is executed by a central processing unit (CPU) 601, various functions defined in the system of the present application are executed.
[0080] The present application also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor of a computer, the computer executes the above-mentioned three-dimensional vehicle model display method. The computer-readable storage medium may be included in the electronic device described in the above-mentioned embodiment, or may exist independently without being assembled into the electronic device.
[0081] It should be noted that the computer-readable medium shown in the embodiment of the present application can be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium can be, for example, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, wherein a computer-readable computer program is carried. This propagated data signal can take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. A computer program contained on a computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.
[0082] The flowchart and block diagram in the accompanying drawings illustrate the possible architecture, functions and operations of the system, method and computer program product according to various embodiments of the present application. Wherein, each box in the flowchart or block diagram can represent a module, a program segment, or a part of the code, and the above-mentioned module, program segment, or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0083] The units involved in the embodiments described in this application may be implemented by software or hardware, and the units described may also be set in a processor. The names of these units do not, in some cases, constitute limitations on the units themselves.
[0084] The above embodiments are merely illustrative of the principles and effects of the present application, and are not intended to limit the present application. Anyone familiar with the technology may modify or change the above embodiments without violating the spirit and scope of the present application. Therefore, all equivalent modifications or changes made by a person of ordinary skill in the art without departing from the spirit and technical ideas disclosed in the present application shall still be covered by the claims of the present application.
Claims
1. A three-dimensional car model display method, characterized in that: The method comprises: In response to a vehicle model display request, obtaining current configuration information of the vehicle and a three-dimensional vehicle model image set, wherein the vehicle model display request carries vehicle model type information; Determining a target three-dimensional car model according to the configuration information and the car model type information, and matching a target car model image from the three-dimensional car model image set; Initializing the three-dimensional engine and performing the first rendering of the target three-dimensional car model, and at the same time, displaying the target car model image as a placeholder in the three-dimensional car model interface; If it is monitored that the first rendering is completed, the three-dimensional car model interface is switched from the target car model image to the first rendering screen.
2. The three-dimensional vehicle model display method according to claim 1, characterized in that: The step of matching a target vehicle model image from the three-dimensional vehicle model image set comprises: Determine the target vehicle model type according to the vehicle model type information, wherein the target vehicle model type is any one of a physical vehicle model, an energy vehicle model and a transparent vehicle model, the physical vehicle model is displayed on the vehicle control page, the energy vehicle model is displayed on the vehicle energy management page, and the transparent vehicle model is displayed on the vehicle status page; According to the target car model type, matching a corresponding image subset from the three-dimensional car model image set; According to the configuration information, the target vehicle model image is matched from the image subset, wherein the configuration information includes vehicle paint information, interior information and wheel hub information.
3. The three-dimensional vehicle model display method according to claim 2, characterized in that: The matching of a corresponding image subset from the three-dimensional vehicle model image set according to the target vehicle model type includes: Determine whether the target car model type is the physical car model; If the target car model type is the physical car model, determining the display mode of the physical car model based on the current light intensity, wherein the display mode includes a day mode and a night mode; If the display mode is the day mode, a corresponding day image subset is matched from the three-dimensional vehicle model image set; if the display mode is the night mode, a corresponding night image subset is matched from the three-dimensional vehicle model image set.
4. The three-dimensional vehicle model display method according to claim 1, characterized in that: The step of switching the three-dimensional vehicle model interface from the target vehicle model image to the first rendering image includes: Preloading the first rendering picture and monitoring a switching signal, wherein the switching signal is automatically generated after the first rendering is completed; In response to the switching signal, a pre-constructed image hiding method is called to hide the target car model image, and while the target car model image is hidden, the first rendering picture is popped up.
5. The three-dimensional vehicle model display method according to claim 1, characterized in that: After the three-dimensional car model interface is switched from the target car model image to the first rendering image, the method further includes: Before cutting out the three-dimensional car model interface, based on the current state of the vehicle, dynamically capture the state of the target three-dimensional car model to obtain a three-dimensional car model dynamic image; When entering the three-dimensional car model interface, performing a second rendering of the target three-dimensional car model in the current state, and at the same time, displaying the three-dimensional car model dynamic image as a placeholder in the three-dimensional car model interface; If it is monitored that the second rendering is completed, the three-dimensional car model interface is switched from the three-dimensional car model dynamic image to the second rendering interface.
6. The three-dimensional vehicle model display method according to claim 5, characterized in that: The method for determining whether the first rendering and the second rendering are completed includes: Obtaining a back buffer layer of the target three-dimensional vehicle model during the rendering process to generate a bitmap image; According to a preset pixel point area, determining a target pixel point from the bitmap image, and extracting a pixel value of the target pixel point; The pixel value is matched with a preset pixel threshold, and whether the rendering is completed is determined based on the matching result.
7. The three-dimensional vehicle model display method according to any one of claims 1 to 6, characterized in that: The generation of the three-dimensional vehicle model image set includes: According to different combinations of various car model types and various configuration information, various three-dimensional car models are rendered and displayed in turn, and screenshots of the display results are taken; According to a preset size of the three-dimensional car model, the three-dimensional car model is cropped for each of the screenshots to obtain a three-dimensional car model image; Classifying and naming each of the three-dimensional car model images according to the corresponding car model type and configuration information, and compressing each of the three-dimensional car model images to obtain multiple image subsets; Based on the multiple image subsets, the three-dimensional vehicle model image set is generated.
8. A three-dimensional car model display system, characterized in that: The system comprises: An acquisition module, configured to acquire the current configuration information of the vehicle and a set of three-dimensional vehicle model images in response to a vehicle model display request, wherein the vehicle model display request carries vehicle model type information; A determination module, which determines a target three-dimensional car model according to the configuration information and the car model type information, and matches a target car model image from the three-dimensional car model image set; A display module, used to initialize the three-dimensional engine and perform the first rendering of the target three-dimensional car model, and at the same time, display the target car model image as a placeholder in the three-dimensional car model interface; A switching module is used to switch the three-dimensional car model interface from the target car model image to the first rendering screen if it is detected that the first rendering is completed.
9. A vehicle-mounted terminal, characterized in that: include: one or more processors; A storage device is used to store one or more programs. When the one or more programs are executed by one or more processors, the electronic device implements the three-dimensional vehicle model display method described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: Computer-readable instructions are stored thereon, and when the computer-readable instructions are executed by a processor of a computer, the computer is enabled to execute the three-dimensional vehicle model display method described in any one of claims 1 to 7.
Citation Information
Cited By
Vehicle model display method and device, vehicle and storage medium
CN120156309A
Vehicle machine interface switching method and device, computer equipment and storage medium
CN120743422A
