Rendering method and device, computer readable storage medium and computer program product
By gradually transitioning the coating color, material, brightness, pattern and transparency in 3D environment rendering, the problem of hard coating switching effect is solved, natural and smooth coating switching is achieved, and the user experience is improved.
Patent Information
- Application Number
- CN202510669575.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-22
- Publication Date
- 2025-08-29
AI Technical Summary
In 3D environment rendering, the object model coating switching effect is stiff, lacking naturalness and smoothness.
By determining the original coating and target coating of the object model, the coating switching rendering method is used, combined with the rendering progress bar and curve function, the coating color, material, brightness, pattern and transparency are gradually transitioned to achieve natural switching of the coating.
It improves the naturalness and smoothness of coating switching, provides a diverse rendering mode, and enhances the user interaction experience.
Smart Images

Figure CN120563701A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of image processing technology, and in particular to a rendering method, device, computer-readable storage medium, and computer program product. Background Art
[0002] Currently, in 3D (three-dimensional) environment rendering technology, computer graphics technology is used to render virtual scenes into 3D images to provide a realistic visual experience.
[0003] In the related art, when switching the surface coating of a displayed object model, the effect is abrupt. Summary of the Invention
[0004] To overcome the problems existing in the related art, the present disclosure provides a rendering method, apparatus, computer-readable storage medium, and computer program product.
[0005] According to a first aspect of an embodiment of the present disclosure, a rendering method is provided, which includes: determining an original coating and a target coating of the object model; the original coating and the target coating are used to cover the outside of the object model; in response to the operation of switching the object model from the original coating to the target coating, performing coating switching rendering on the object model; the area on the object model where the coating switching rendering has been completed displays the target coating, and the area on the object model where the coating switching rendering has not been completed retains the original coating, and the coating switching rendering includes at least one of coating color switching, coating material switching, coating brightness switching, coating pattern switching and coating transparency switching.
[0006] Through the above technical solution, when displaying the appearance of an object model, the rendered area can be switched to the target coating while the unrendered area maintains the original coating, thereby gradually transitioning the original coating of the object model to the target coating, achieving smooth switching of the coating and improving the naturalness of the coating switching.
[0007] In some possible embodiments, in response to the operation of switching the object model from the original coating to the target coating, performing coating switching rendering on the object model includes: in response to the operation of switching the object model from the original coating to the target coating, performing coating switching rendering on the object model according to a rendering progress bar; the area on one side of the rendering progress bar is the target coating, and the area on the other side is the original coating.
[0008] Through the above technical solution, a rendering progress bar can be used to display the current rendering progress, allowing users to intuitively feel the rendering progress of switching from the original coating to the target coating, and users can use the rendering progress bar to intuitively distinguish the comparison effect between the rendered area and the unrendered area.
[0009] In some possible implementations, the method further includes: obtaining the progress bar position of the rendering progress bar on the object model based on a curve function and a time proportion; the curve function is used to indicate the speed at which the rendering progress bar renders the object model, and the time proportion is the proportion of the rendering time already rendered by the rendering progress bar to the total rendering time.
[0010] Through the above technical solution, a curve function can be used to adjust the speed of rendering the object model by the rendering progress bar, so as to present the user with a variety of rendering modes of the rendering object model.
[0011] In some possible implementations, the progress bar position is used to determine the progress bar coordinates; the method further includes: for any area on the object model, rendering a coating covering the area based on the size relationship between the area coordinates and the progress bar coordinates on the same coordinate axis.
[0012] Through the above technical solution, it is possible to determine whether the coating rendered on the area is the original coating or the target coating based on the size relationship between the area coordinates and the progress bar coordinates. Since the coating rendered on the area is determined by comparison, the amount of calculation is small, and the area can be rendered quickly after the rendering progress bar passes through the area.
[0013] In some possible embodiments, for any area on the object model, the coating covering the area is rendered according to the size relationship between the area coordinates and the progress bar coordinates under the same coordinate axis, including: when the area coordinates are smaller than the progress bar coordinates, the coating covering the area is rendered as the target coating.
[0014] Through the above technical solution, when the area coordinates are smaller than the progress bar coordinates, it means that the area is the area rendered by the rendering progress bar. Therefore, the coating covering the area can be rendered as the target coating, thereby ensuring that the area that has been rendered by the rendering progress bar is switched to the target coating.
[0015] In some possible implementations, for any area on the object model, rendering the coating covering the area according to the size relationship between the area coordinates and the progress bar coordinates on the same coordinate axis includes: when the area coordinates are greater than the progress bar coordinates, keeping the coating covering the area as the original coating.
[0016] Through the above technical solution, when the area coordinates are greater than the progress bar position, it means that the area is an area that has not been rendered by the rendering progress bar. Therefore, there is no need to switch the rendering coating of the area, thereby ensuring that the area that has not been rendered by the rendering progress bar remains in the original coating.
[0017] In some possible implementations, the object model is a vehicle model, the original coating includes an original vehicle paint, and the target coating includes a target vehicle paint; performing coating switching rendering on the object model in response to the operation of switching the object model from the original coating to the target coating includes: performing paint switching rendering on the vehicle model in response to the operation of switching the vehicle model from the original vehicle paint to the target vehicle paint; the area on the vehicle model where the paint switching rendering is completed displays the target vehicle paint, and the area on the vehicle model where the paint switching rendering is not completed retains the original vehicle paint.
[0018] Through the above technical solution, when displaying the appearance of the vehicle model, the rendered area can be switched to the target paint while the unrendered area retains the original paint, thereby gradually transitioning the original paint of the vehicle model to the target paint, achieving smooth switching of the paint and improving the naturalness of the paint switching.
[0019] In some possible embodiments, the coating color includes the reflection color of the coating; the method further includes: for any area on the object model, determining the reflection color of the coating rendered on the area based on the intersection between the reflection direction on the area and the environment reflection map; the reflection direction is symmetrical to the image acquisition direction, the image acquisition direction is the direction of the image acquisition device on the object model toward the area, and the environment reflection map is a spherical map of the environment in which the object model is located.
[0020] Through the above technical solution, the intersection between the reflection direction of the area and the environment reflection map can be calculated, so that the color of the intersection on the environment reflection map is used as the reflection color of the area on the object model. Then, the final coating switching effect will also present the dynamic switching of the reflection colors of different areas on the object model, so that the coating effect switching of the object model is close to the coating effect switching in the actual environment. It can also be understood that in the process of rendering the object model, the reflection color of the rendered area is obtained in combination with the ambient light, so the reflection color of the rendered area will change dynamically with the change of ambient light.
[0021] In some possible embodiments, the coating brightness includes the highlight intensity of the coating; the method further includes: for any area on the object model, determining the highlight intensity of the coating rendered on the area based on the angle between the image acquisition direction and the normal on the area; the image acquisition direction is the direction of the image acquisition device on the object model toward the area.
[0022] Through the above technical solution, the angle between the image acquisition direction and the normal at the area can be calculated, and the highlight intensity of the coating covering the area position can be calculated based on the angle. Then, the final coating switching effect will also present the dynamic switching of the highlight intensity of different areas on the object model, so that the coating effect switching of the object model is close to the coating effect switching in the actual environment. It can also be understood that in the process of rendering the object model, the highlight intensity of the rendered area is obtained in combination with the ambient light, so the highlight intensity of the rendered area will change dynamically with the change of the ambient light.
[0023] In some possible implementations, the target coating is a coating of a real object corresponding to the object model or a coating set by a user.
[0024] Through the above technical solution, users can scan the target coating of a real object through a terminal and transmit it to the rendering device. The rendering device then renders the object model into the target coating, so that the appearance of the object model displayed on the rendering device matches the appearance of the real object, improving the user interaction experience. Users can also set their own desired target coating on the rendering device, which then renders the object model into the target coating, making it easier for users to view the appearance of the real object after the coating is switched, and assisting users in selecting the appearance of the real object.
[0025] In some possible implementations, the speed of rendering the object model is constant or changes dynamically.
[0026] Through the above technical solution, the speed of rendering the object model can be constant or dynamically changed at different speeds, thereby providing users with a variety of rendering modes.
[0027] According to a second aspect of an embodiment of the present disclosure, a rendering device is provided, which is used to render an object model, and the rendering device includes: a coating module, configured to determine an original coating and a target coating of the object model; the original coating and the target coating are used to cover the outside of the object model; a rendering module, configured to perform coating switching rendering on the object model in response to an operation of switching the object model from the original coating to the target coating; the area on the object model where the coating switching rendering has been completed displays the target coating, and the area on the object model where the coating switching rendering has not been completed retains the original coating, and the coating switching rendering includes at least one of coating color switching, coating material switching, coating brightness switching, coating pattern switching and coating transparency switching.
[0028] In one possible embodiment, the rendering module is further configured to perform coating switching rendering on the object model according to a rendering progress bar in response to the operation of switching the object model from the original coating to the target coating; the area on one side of the rendering progress bar is the target coating, and the area on the other side is the original coating.
[0029] In one possible implementation, the rendering device further includes: a progress bar position calculation module, configured to obtain the progress bar position of the rendering progress bar on the object model based on a curve function and a time proportion; the curve function is used to indicate the speed at which the rendering progress bar renders the object model, and the time proportion is the proportion of the rendering time already rendered by the rendering progress bar to the total rendering time.
[0030] In one possible implementation, the progress bar position is used to determine the progress bar coordinates; the rendering device further includes: a calculation module configured to render a coating covering any area on the object model based on a size relationship between the area coordinates and the progress bar coordinates on the same coordinate axis.
[0031] In one possible implementation, the speed of rendering the object model is constant or changes dynamically.
[0032] According to a third aspect of an embodiment of the present disclosure, a rendering device, a processor, and a memory for storing processor-executable instructions are provided; wherein the processor is configured to execute the steps of the rendering method provided in the first aspect of the embodiment of the present disclosure.
[0033] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, on which computer program instructions are stored. When the program instructions are executed by a processor, the steps of the rendering method provided in the first aspect of the present disclosure are implemented.
[0034] According to a fifth aspect of an embodiment of the present disclosure, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the steps of the rendering method provided in the first aspect of the present disclosure.
[0035] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0037] Figure 1 The figure is a flowchart showing the steps of a rendering method according to an exemplary embodiment.
[0038] Figure 2 The figure is a schematic diagram showing a rendering progress bar with a red rendered area on one side and a dark blue unrendered area on the other side according to an exemplary embodiment.
[0039] Figure 3 The figure is a flowchart showing the steps of a rendering method according to an exemplary embodiment.
[0040] Figure 4 It is a schematic diagram showing 0% rendering progress, 5% rendering progress and 100% rendering progress according to an exemplary embodiment.
[0041] Figure 5 is a schematic diagram showing a curve function according to an exemplary embodiment.
[0042] Figure 6 is a schematic diagram showing a curve function according to an exemplary embodiment.
[0043] Figure 7 is a schematic diagram showing a curve function according to an exemplary embodiment.
[0044] Figure 8 is a schematic diagram showing a curve function according to an exemplary embodiment.
[0045] Figure 9 The figure is a flowchart showing the steps of a rendering method according to an exemplary embodiment.
[0046] Figure 10 The figure is a schematic diagram showing an environment reflection map according to an exemplary embodiment.
[0047] Figure 11 It is a schematic diagram showing an image acquisition direction, a normal line, and a reflection direction at point 1 and point 2 according to an exemplary embodiment.
[0048] Figure 12 FIG. 1 is a schematic diagram showing the image acquisition direction and normal at point 1 and point 2 according to an exemplary embodiment.
[0049] Figure 13 The figure is a block diagram showing a rendering device according to an exemplary embodiment.
[0050] Figure 14 is a block diagram of a vehicle according to an exemplary embodiment.
[0051] Figure 15 The figure is a block diagram showing a rendering device according to an exemplary embodiment.
[0052] Figure 16is a block diagram of a chip system according to an exemplary embodiment. DETAILED DESCRIPTION
[0053] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. In the following description, when referring to the drawings, identical numerals in different figures represent identical or similar elements, unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all possible embodiments consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
[0054] It should be noted that all actions of acquiring signals, information or data in the present disclosure are carried out in compliance with the corresponding data protection laws and policies of the country where they are located and with the authorization given by the owner of the corresponding device.
[0055] Figure 1 is a flowchart of a rendering method according to an exemplary embodiment. Figure 1 As shown, the rendering method is used in a rendering device, which is used to display the rendering effect of coating switching. The rendering device can be a terminal such as a mobile phone, tablet, computer, etc., or a device such as a central control screen on a vehicle, or a home appliance such as a washing machine, air conditioner, and speaker. Figure 1 As shown, the rendering method includes the following steps.
[0056] In step S10 , an original coating and a target coating of the object model are determined.
[0057] The original coating and target coating are used to cover the exterior of the object model. The original coating is the current coating covering the exterior of the object model, and the target coating is the desired coating covering the exterior of the object model after switching. The coating covering the exterior of the object model serves as the exterior appearance of the object model. This coating can also be called a paint layer, film layer, or covering layer.
[0058] Among them, the object model is a virtual model displayed by the rendering device. The virtual model can be a 3D model and can respond to the user's touch operation on the object model, such as dragging operation, so as to display the object model from different perspectives. The object model corresponds to a real object, and the real object will also be covered with a coating. For example, the real object corresponding to the object model can be a vehicle, building structure, home appliance, mechanical parts, toys, outdoor equipment, etc. Vehicles include vehicles, bicycles, motorcycles, ships, airplanes, etc.; building structures include doors and windows, bridges, etc.; home appliances include mobile phones, tablets, computers, washing machines, air conditioners, speakers, keyboards, microwave ovens, ovens, etc.; mechanical parts include machine tools, engine casings, industrial pipes, etc.; toys include toy cars, toy airplanes, building models, mechanical models, etc.; outdoor equipment includes tents, slides, swings, etc. When the user wants to understand the appearance of the object model after the coating is changed, the user can switch the coating covering the object model through the rendering device, switching the original coating to the target coating they want, so as to view the appearance of the object model after the coating is switched.
[0059] In a possible implementation, the target coating is a coating of a real object corresponding to the object model or a coating set by a user.
[0060] Among them, the terminal can be used to scan the coating covering the outside of the real object, and the terminal sends the coating outside the real object to the rendering device. The rendering device uses the coating scanned by the terminal as the target coating and automatically switches the original coating outside the object model to the target coating.
[0061] For example, taking the object model as a vehicle model, the user uses a mobile phone bound to the vehicle to shoot the real paint outside the real vehicle and sends the real paint to the vehicle. The vehicle then switches the original paint outside the vehicle model to the real paint, and then switches the paint of the vehicle model displayed on the vehicle's central control screen from the original paint to the real paint.
[0062] The rendering device may display multiple coating layers of the object model for the user to select, and then automatically switch the original coating layer outside the object model to the target coating layer in response to a triggering operation on a target coating layer among the multiple coating layers.
[0063] For example, taking the rendering device as a vehicle and the object model as a vehicle model, multiple car paints are displayed on the vehicle's central control screen. The user can select a target car paint from the multiple car paints, and the vehicle then switches the car paint displayed on the central control screen from the original car paint to the target car paint.
[0064] In step S20 , in response to the operation of switching the object model from the original coating to the target coating, coating switching rendering is performed on the object model.
[0065] The directions for rendering the object model include a first direction, a second direction, and a third direction, and the first direction, the second direction, and the third direction are all perpendicular to each other.
[0066] For example, the first direction is the up-down direction, which can be rendered from top to bottom or from bottom to top; the second direction is the left-right direction, which can be rendered from left to right or from right to left; the third direction is the front-back direction, which can be rendered from front to back or from back to front.
[0067] The object model is rendered so that the coating on the object model will present a rendering transition effect during the switching process. The rendered area on the object model will be rendered as the target coating, and the unrendered area on the object model will maintain the original coating.
[0068] For example, see Figure 2 As shown in the figure, if the base color of the original coating is dark blue and the base color of the target coating is red, the object model will be dark blue before rendering. During the rendering process, the rendered areas will appear red and the unrendered areas will appear dark blue. After rendering, the object model will be red as a whole.
[0069] The coating switching rendering includes at least one of coating color switching, coating material switching, coating brightness switching, coating pattern switching, coating transparency switching and coating pattern switching.
[0070] For coating color switching, the coating color includes the base color of the coating and the reflected color of the coating. The base color of the coating is the overall background color of the object model and also the overall color of the object model; the reflected color of the coating is the color of the surrounding ambient light reflected by the coating.
[0071] For example, in response to an operation of switching an object model from an original coating to a target coating, the base color of the coating on the object model may be switched, with areas on the object model where the base color switch has completed being displayed in the target base color, while areas on the object model where the base color switch has not completed being displayed in the original base color. For example, if the target base color is red and the original base color is dark blue, in response to an operation of switching the object model from the original coating to the target coating, areas on the object model where the base color switch has completed being displayed in red, while areas where the base color switch has not completed being displayed in dark blue.
[0072] For example, in response to the operation of switching the object model from the original coating to the target coating, the reflection color of the coating of the object model can be switched, and the area on the object model where the reflection color switching has been completed displays the target reflection color, and the area on the object model where the reflection color switching has not been completed maintains the original reflection color.
[0073] For coating material switching, coating materials include grinding surface, glossy surface, texture, etc.
[0074] For example, in response to an operation that switches the object model from an original coating to a target coating, the coating material of the object model can be switched. Regions on the object model where the coating material switch has completed display the target coating material, while regions on the object model where the coating material switch has not completed retain the original coating material. For example, if the target coating material is glossy and the original coating material is matte, in response to the operation that switches the object model from the original coating to the target coating, regions on the object model where the coating material switch has completed display the matte surface, while regions where the coating material switch has not completed retain the gloss surface.
[0075] For coating brightness switching, the coating brightness includes the highlight intensity of the coating. The highlight intensity of the coating is the ability of the coating to reflect light. The higher the highlight intensity of the coating, the more obvious the reflective effect of the coating surface and the higher the glossiness of the coating.
[0076] For example, in response to the operation of switching the object model from the original coating to the target coating, the highlight intensity of the coating of the object model can be switched, and the area on the object where the coating material switching has been completed will display the target highlight intensity, while the area on the object where the coating material switching has not been completed will maintain the original highlight intensity.
[0077] With respect to coating transparency, the coating transparency ranges from 0% transparency, which indicates that the coating is opaque, to 100% transparency, which indicates that the coating is completely transparent.
[0078] For example, in response to the operation of switching the object model from the original coating to the target coating, the coating transparency of the object model can be switched, and the area on the object where the coating transparency switching has been completed will display the coating with the target transparency, while the area on the object where the coating transparency switching has not been completed will maintain the coating with the original transparency.
[0079] As for coating pattern switching, the coating pattern is a pattern attached to the object model, such as a personalized pattern such as a panda pattern, a cat pattern, or a puppy pattern. The user can upload the real pattern to the rendering device, and the rendering device will render the uploaded real pattern as the target pattern; the user can also select or set the target pattern they want on the rendering device, and the rendering device will then render the target pattern. Of course, the user can also set the position of the target pattern on the object model on the rendering device, such as setting the target pattern on the left, right, or tail of the object model. The rendering device determines the target coordinates of key positions such as the vertex and center point of the target pattern on the object model based on the position of the target pattern set by the user, and renders the target pattern on the object model based on the target coordinates.
[0080] For example, in response to the operation of switching the object model from the original coating to the target coating, the coating pattern of the object model can be switched. If the target coordinates are included in the area that has been rendered, the area corresponding to the target coordinates is rendered as the target pattern until the target pattern is rendered on the object model.
[0081] The operation of switching the object model from the original coating to the target coating includes: (1) uploading the coating of the real object corresponding to the scanned object model to the rendering device, and the rendering device uses the coating of the scanned real object as the target coating; (2) the user sets the desired target coating on the rendering device. For example, the user can configure the target coating on the rendering device, or select the target coating to be displayed from multiple recommended coatings.
[0082] In some scenarios, if the object model is a vehicle model and the coating is the car paint covering the object model, before purchasing the vehicle, the user can use a computer or tablet computer to select the target coating color, target coating material, target coating brightness and target coating transparency on the terminal. In this way, the terminal can respond to the user configuration and display the rendered area on the object model as the target coating color, target coating material, target coating brightness and target coating transparency, and the unrendered area as the original coating color, original coating material, original coating brightness and original coating transparency, so as to facilitate the user to view the dynamic switching effect of the car paint, and the comparison of the rendering effects between the unrendered area and the rendered area on the vehicle model can also facilitate the user to intuitively compare the car paint effect before rendering and the car paint effect after rendering, so as to assist the user in selecting the car paint for the vehicle.
[0083] In other scenarios, if the object model is a vehicle model and the coating is the paint covering the object model, after the user purchases the vehicle, the central control screen of the vehicle will usually simulate and display a scene of the vehicle model driving on the road. In order to make the vehicle model displayed on the central control screen close to the real vehicle actually driven by the user, the user can scan the target paint of the real vehicle through the terminal, and then transmit the target paint of the real vehicle to the central control screen of the vehicle. After the central control screen of the vehicle receives the target paint, it dynamically switches the original paint displayed on the central control screen to the target paint, thereby displaying the appearance effect after the paint is switched on the central control screen of the vehicle, so that the paint covering the vehicle model displayed on the central control screen of the vehicle is consistent with the paint currently sprayed on the real vehicle. Then, the appearance of the vehicle model displayed on the central control screen of the vehicle can be closer to the appearance of the real vehicle, making the vehicle driving scene diagram displayed on the central control screen closer to the actual driving scene.
[0084] In related technologies, when rendering an object model, a hard switching method is used to switch the color covering the object model to another color. For example, the object model is dark blue as a whole at one time, and the object model is directly switched to red as a whole at the next time. The switching fluency is low and the switching effect is relatively abrupt.
[0085] Through the above technical solution, the original coating and target coating of the object model can be obtained first, and then the object model can be rendered so that the rendered areas are rendered as the target coating, and the unrendered areas retain the original coating. In this way, the coating on the object model will gradually transition from the original coating to the target coating, and all rendered areas will switch to the target coating. For example, if the object model is a vehicle model, when the vehicle model is rendered from left to right, the original coating on the vehicle model will gradually transition from left to right to the target coating.
[0086] Figure 3 This is an exemplary embodiment involved in the above step S20, which is used to explain an exemplary solution for rendering an object model, including the following steps:
[0087] In step S21 , in response to the operation of switching the object model from the original coating to the target coating, coating switching rendering is performed on the object model according to a rendering progress bar.
[0088] Among them, see Figure 3 As shown, the rendering progress bar is a dividing line that is used to distinguish between the rendered area and the unrendered area. The area on one side of the rendering progress bar is the target coating, which is the area that has been rendered; the area on the other side of the rendering progress bar is the original coating, which is the area that has not been rendered.
[0089] When the rendering progress bar is rendered on the object model, it can be presented as a dividing line. The dividing line can have its own fluorescent effect. The area passed by the rendering progress bar will automatically switch from the original coating to the target coating.
[0090] The use of the rendering progress bar to render the object model means that during the switching process of the coating effect of the object model, a segmentation effect of the rendering progress bar dividing the rendered area and the unrendered area of the object model will be presented.
[0091] In a possible implementation, the progress bar position of the rendering progress bar on the object model may be obtained according to the curve function and the time proportion.
[0092] The time proportion is the proportion of the rendering time already rendered by the rendering progress bar to the total rendering time. The total rendering time is the time required to render the entire object model. The total rendering time can be preconfigured.
[0093] The curve function is used to indicate the speed at which the rendering progress bar renders the object model. Different curve functions may indicate different rendering speeds for the object model, thereby presenting different rendering effects to the user. The vertical coordinate of the curve function is the position of the rendering progress bar on the object model, or it may be the rendering progress. For example, see Figure 4 As shown, in the process of the rendering progress bar rendering the object model from left to right, 50% rendering progress means that the progress bar position of the rendering progress bar on the object model is in the middle of the object model, and half of the rendering has been completed; 0% rendering progress means that the progress bar position of the rendering progress bar on the object model is at the head of the object model, and rendering has not yet started; 100% rendering progress means that the progress bar position of the rendering progress bar on the object model is at the tail of the object model, and rendering has been completed at this time.
[0094] The speed of rendering the object model can be constant or dynamically changed. The speed of rendering the object model can be determined by the derivative of the curve function. A larger derivative of the curve function represents a faster rendering speed of the object model; a smaller derivative of the curve function represents a slower rendering speed of the object model; a constant derivative of the curve function represents a constant rendering speed of the object model.
[0095] For example, the curve function and the time ratio have the following functional relationship:
[0096] p=AC(t / ts)(1)
[0097] In formula (1), AC(*) is the expression of the curve function, t is the rendering time that has been experienced, ts is the total rendering time, t / ts is the time ratio, which is used as the input of the curve function; p is the position of the rendering progress bar on the object model, which is also the rendering progress.
[0098] From the above formula (1), it can be seen that after obtaining the time ratio of the current rendering time to the total rendering time, the above formula (1) can be input to obtain the current rendering progress. Each rendering time corresponds to a progress bar position of a rendering progress bar on the object model. After obtaining the current time ratio, the time ratio is input into the above formula (1) to obtain the progress bar position of the object model rendering progress bar. The rendering progress bar is then displayed at the progress bar position, thereby presenting the effect of the rendering progress bar scanning and rendering along the first direction, the second direction, or the third direction on the object model. Moreover, by changing the expression of the curve function, the rendering speed of the rendering progress bar on the object model can be adjusted, thereby presenting different dynamic rendering effects.
[0099] The dynamic changes in the speed of rendering the object model include: first fast then slow, first slow then fast, first slow then fast then slow, first slow then reduce the speed then fast, etc.
[0100] For example, see Figure 5 As shown, Figure 5 The derivative of the curve function is small at first and then large, which means that the speed of rendering the object model is slow at first and then fast.
[0101] For example, see Figure 6 As shown, Figure 6 The derivative of the curve function is first large and then small, which means that the speed of rendering the object model is first fast and then slow.
[0102] For example, see Figure 7 As shown, Figure 7 The derivative of the curve function is first small, then large, and then small again, which means that the speed of rendering the object model is first slow, then fast, and then slow again.
[0103] For example, see Figure 8 As shown, Figure 8 The derivative of the curve function is first small, then becomes smaller, and then becomes larger, which means that the speed of rendering the object model is first slow, then decreases, and then increases.
[0104] It can be understood that the curve function for rendering the object model can be pre-configured, and multiple rendering modes can be displayed. In response to the user's selection of a target rendering mode among the multiple rendering modes, the curve function corresponding to the target rendering mode is used to control the rendering of the rendering progress bar on the object model. Different curve functions correspond to different changes in rendering speed.
[0105] Through the above technical solution, the dynamic switching process of the coating on the object model can be displayed through the rendering progress bar. The area rendered by the rendering progress bar will be switched to the target coating, and the unrendered area will retain the original coating, thereby making the visualization effect of the coating switching on the object model better and the user viewing experience better.
[0106] Figure 9 This is an exemplary embodiment of the present disclosure. The progress bar position is used to determine the progress bar coordinates. This embodiment is used to interpret the determination of the coating required to be rendered on each area when rendering the coating, including the following steps:
[0107] In step S30 , for any region on the object model, a coating covering the region is rendered according to the size relationship between the region coordinates and the progress bar coordinates on the same coordinate axis.
[0108] The object model is an image displayed on the interface, and the region on the object model can be a pixel point, and the region coordinates can be a pixel point coordinates.
[0109] For example, for any pixel on the object model, the original coating or the target coating is rendered to the pixel according to the size relationship between the pixel coordinates and the progress bar coordinates. Of course, the area can also be an area composed of multiple pixels, and this disclosure does not limit this.
[0110] Among them, the regional coordinates and progress bar coordinates under the same coordinate axis include the regional coordinates and progress bar coordinates under the same horizontal axis (X-axis), the regional coordinates and progress bar coordinates under the same vertical axis (Y-axis), and the regional coordinates and progress bar coordinates under the same vertical axis (Z-axis). Therefore, when comparing the sizes, the horizontal coordinates of the regional coordinates under the horizontal axis can be compared with the horizontal coordinates of the progress bar coordinates to achieve rendering in the second direction (for example, the left and right direction), the vertical coordinates of the regional coordinates under the vertical axis can be compared with the vertical coordinates of the progress bar coordinates to achieve rendering in the third direction (for example, the front and back direction), and the vertical coordinates of the regional coordinates under the vertical axis can be compared with the vertical coordinates of the progress bar coordinates to achieve rendering in the first direction (for example, the up and down direction).
[0111] In a possible implementation, when the coordinates of the region are smaller than the coordinates of the progress bar, the coating covering the region is rendered as the target coating.
[0112] Wherein, when the horizontal coordinate of the region coordinate is smaller than the horizontal coordinate of the progress bar coordinate, the coating layer covering the region may be rendered as the target coating layer.
[0113] For example, see Figure 2 As shown, a coordinate system can be established with the head of the object model as the rendering starting point and the tail of the object model as the rendering ending point. When rendering the object model from left to right, if the horizontal coordinate of a certain area coordinate is smaller than the horizontal coordinate of the progress bar coordinate, it means that the area is located in the rendered area on the left side of the rendering progress bar. The rendering progress bar has already rendered this area, so this area can be rendered as the target coating.
[0114] In a possible implementation, when the coordinates of the region are greater than the coordinates of the progress bar, the coating covering the region is maintained as the original coating.
[0115] Wherein, when the abscissa of the region coordinate is greater than the abscissa of the progress bar coordinate, the coating layer covering the region may be kept as the original coating layer.
[0116] For example, see Figure 2As shown, a coordinate system can be established with the head of the object model as the rendering starting point and the tail of the object model as the rendering ending point. When rendering the object model from left to right, if the horizontal coordinate of a certain area coordinate is greater than the horizontal coordinate of the progress bar coordinate, it means that the area coordinate is located in the unrendered area to the right of the rendering progress bar, and the rendering progress bar has not rendered this area yet, so this area can be kept as the original coating.
[0117] It can be understood that the above example uses the horizontal coordinate of the regional coordinate to compare the horizontal coordinate of the progress bar coordinate, which is also applicable to the size comparison of the vertical coordinate of the regional coordinate to the vertical coordinate of the progress bar coordinate, and the size comparison of the vertical coordinate of the regional coordinate to the vertical coordinate of the progress bar coordinate, which will not be repeated here.
[0118] Among them, the areas on both sides of the rendering progress bar can also be divided into rendered areas and unrendered areas. If the area coordinates are within the rendered area, the area is rendered as the target coating. If the area coordinates are within the unrendered area, the area is kept as the original coating. The present disclosure does not limit this implementation method.
[0119] In one possible implementation, the region coordinates and the progress bar position are mapped to the same coordinate system. When the region coordinates and the progress bar position are in the same coordinate system, the coating overlying the region is rendered based on the magnitude relationship between the region coordinates and the progress bar position in the same coordinate system. Since the region coordinates and the progress bar position can be located in a variety of coordinate systems, they can be unified into multiple coordinate systems for comparison, as shown in the following three examples.
[0120] In the first example, if the region coordinates are pixel coordinates, the pixel coordinates can be mapped to the world coordinate system, the progress bar position can be mapped to the world coordinate system to obtain the progress bar coordinates, and the pixel coordinates and the progress bar coordinates can be compared in the world coordinate system. When the pixel coordinates in the world coordinate system (e.g., the horizontal coordinate of the pixel) are smaller than the progress bar coordinates in the world coordinate system (e.g., the horizontal coordinate of the progress bar), the pixel is rendered as the target coating; when the pixel coordinates in the world coordinate system are larger than the progress bar coordinates in the world coordinate system, the pixel remains in the original coating.
[0121] Among them, the pixel coordinates can be converted to the world coordinate system through camera extrinsic parameters, camera intrinsic parameters, etc., which will not be repeated here.
[0122] Among them, the progress bar position can be normalized first to obtain the normalized progress bar position; then the progress bar coordinates in the world coordinate system can be obtained according to the normalized progress bar position, the position of the starting point of the object model in the world coordinate system, and the position of the end point of the object model in the world coordinate system.
[0123] The expression for normalizing the progress bar position is as follows:
[0124] float t=(value-minValue) / (maxValue-minValue)(2)
[0125] In formula (2), float t is the normalized progress bar position; value is the current progress bar position; minValue is the minimum progress bar position, such as 0%; and maxValue is the maximum progress bar position, such as 100%.
[0126] The calculation formula based on the normalized progress bar position, the position of the starting point of the object model in the world coordinate system, and the position of the end point of the object model in the world coordinate system is as follows:
[0127] float progress=PosX1+float t*(PosX2-PosX1)(3)
[0128] In formula (3), float progress is the coordinate of the progress bar in the world coordinate system; PosX1 is the position of the starting point of the object model in the world coordinate system; float t is the normalized position of the progress bar; and PosX2 is the position of the end point of the object model in the world coordinate system.
[0129] From the above formula (3), it can be seen that the difference between the position of the end point of the object model in the world coordinate system and the position of the starting point of the object model in the world coordinate system can be calculated to obtain the length of the object model; then, based on the length of the object model and the normalized progress bar position, the rendering length that the progress bar position has experienced can be obtained; and then, based on the position of the starting point of the object model in the world coordinate system, the rendering length can be superimposed to obtain the coordinates of the progress bar in the world coordinate system.
[0130] For example, if the normalized progress bar position is 0.5, its value range is between [0, 1], and the value range of the world coordinate system is between [-1, 1]. Using the above formula (3) to calculate the coordinates of the progress bar in the world coordinate system, we can obtain float progress = -1 + 0.5 * (1 - (-1)) = 0, and the horizontal coordinate of the progress bar coordinate in the world coordinate system is 0, thus completing the coordinate system conversion. Moreover, the progress bar position 0.5 before the coordinate system conversion is located in the middle of [0, 1], and the horizontal coordinate 0 of the progress bar coordinate after the coordinate system conversion is located in the middle of [-1, 1], both indicating that the rendering progress has completed 50%, so the coordinate system switching of the progress bar position is accurate.
[0131] In the second example, if the region coordinates are pixel coordinates, the progress bar position can be mapped to the UV coordinate system, and the pixel coordinates and the progress bar position can be compared in the UV coordinate system. When the pixel coordinates in the UV coordinate system (e.g., the U value of the pixel) are smaller than the progress bar coordinates in the UV coordinate system (e.g., the U value of the progress bar coordinates), the pixel is rendered as the target coating; when the pixel coordinates in the UV coordinate system are larger than the progress bar coordinates in the UV coordinate system, the pixel remains in the original coating.
[0132] Among them, the UV coordinate system means that the image is a two-dimensional plane, the horizontal direction is U, and the vertical direction is V. Through the two-dimensional UV coordinate system of this plane, each pixel in the image can be located.
[0133] In a third example, if the region coordinates are vertex positions, the progress bar position can be mapped to the vertex coordinate system, and the vertex position and the progress bar position can be compared in the vertex coordinate system. When the vertex position in the vertex coordinate system (e.g., the X value of the vertex position) is smaller than the progress bar coordinate in the vertex coordinate system (e.g., the X value of the progress bar coordinate), the pixel is rendered as the target coating; when the vertex position in the vertex coordinate system is larger than the progress bar coordinate in the vertex coordinate system, the pixel remains in the original coating.
[0134] Through the above technical solution, it can be determined whether to render the original coating or the target coating for the region coordinates according to the size relationship between the region coordinates and the progress bar coordinates of the rendering progress bar.
[0135] The following describes exemplary embodiments of the present disclosure, which are used to explain exemplary schemes for regional rendering of coatings. Since the coating includes the base color of the coating, the transparency of the coating, the roughness of the coating, the reflective color of the coating, and the highlight intensity of the coating, the following exemplary schemes will be divided into the following to illustrate the rendering schemes in various scenarios.
[0136] In one possible embodiment, the base colors of the original coating and the target coating are different. If the area coordinates are smaller than the progress bar coordinates, the base color of the area is rendered as the target base color. If the area coordinates are larger than the progress bar coordinates, the base color of the area position is maintained as the original base color.
[0137] Among them, the basic color of the coating is the basic color of the entire object model. Taking the object model as a vehicle model and the coating as car paint as an example, the basic colors of the vehicle model's car paint include black, white, green, pink, gray, blue, etc. If the original basic color is black and the target basic color is white, when the area coordinates are at the progress bar coordinates of the rendering progress bar, the basic color of the coating at the area will be rendered white. If the area coordinates are greater than the progress bar coordinates of the rendering progress bar, the basic color of the coating at the area will be kept black.
[0138] In one possible embodiment, the clear coat color and roughness of the original coating layer and the target coating layer may be consistent or inconsistent. If the user has not configured the clear coat color and roughness of the target coating layer, when the original coating layer is switched to the target coating layer, the clear coat color and roughness displayed during the switchover process will be consistent. If the user has configured the clear coat color and roughness of the target coating layer, when the original coating layer is switched to the target coating layer, the original clear coat color and roughness of the original coating layer will be switched to the target clear coat color and roughness.
[0139] The varnish color is a covering layer on the object model used to protect the base color of the coating; the roughness of the coating is used to indicate the roughness of the surface of the object model, such as whether it is a glossy surface or a polished surface.
[0140] In one possible embodiment, the reflection color of the original coating is inconsistent with the reflection color of the target coating. For any region on the object model, the reflection color of the coating rendered on the region is determined based on the intersection of the reflection direction on the region and the environment reflection map.
[0141] The reflected color of the coating refers to the color of the surrounding environment reflected by the coating.
[0142] The reflection direction is symmetrical to the image acquisition direction, and the image acquisition direction is the direction of the image acquisition device (such as a camera, a camera, etc.) simulated on the object model toward the area.
[0143] The environment reflection map is a spherical image of the environment in which the object model is located, for example, a spherical image of the environment in which the real object corresponding to the object model is located, which is used to reflect the brightness changes of the real light in the environment in which the real object is located. For example, see Figure 10 The environment reflection map shown reflects the brightness changes around the real object. The light on the left and right sides of the real object is darker (representing that the sky color on the left and right sides of the real object is darker), and the light directly above the real object is brighter (representing that the sky color directly above the real object is brighter).
[0144] See also Figure 11As shown, at point 1, the direction of the image acquisition device toward the area at point 1 is the image acquisition direction, and the direction after reflection through point 1 is the reflection direction. There will be an intersection 1 on the environmental reflection map in the reflection direction, and the brightness at the intersection 1 is the brightness at point 1. The intersection 1 is the color of the sky directly above the object model, and the light is brighter, so the brightness at the intersection 1 is brighter, so the brightness when rendering the reflected color at point 1 is relatively bright; at point 2, the direction of the image acquisition device toward the area at point 2 is the image acquisition direction, and the direction after reflection through point 2 is the reflection direction. There will be an intersection 2 on the environmental reflection map in the reflection direction, and the brightness at the intersection 2 is the brightness at point 2. The intersection 2 is the color of the sky on the right side of the object model, and the light is darker, so the brightness at the intersection 2 is darker, so the brightness when rendering the reflected color at point 2 is relatively dark.
[0145] In one possible embodiment, the highlight intensity of the original coating is inconsistent with the highlight intensity of the target coating. For any region on the object model, the highlight intensity of the coating rendered at that region is determined based on the angle between the image acquisition direction and the normal to that region. Different angles correspond to different highlight intensities; a larger angle results in a brighter highlight intensity.
[0146] The normal is the line between the image acquisition direction and the reflection direction, and is perpendicular to the surface of the area. The normal is also the vertex normal of each vertex on the object model. Figure 12 As shown, for example Figure 12 The angle between the image acquisition direction and the normal at midpoint 1 is small, and the highlight intensity in this area is strong; for example Figure 13 At midpoint 2, the angle between the image acquisition direction and the normal is larger, and the highlight intensity in this area is weaker.
[0147] Through the above technical solution, users can configure the target varnish color, target roughness, target reflection color, target highlight intensity and other parameters of the target coating by themselves. Then, when the original coating is switched to the target coating, the dynamic changes of the target varnish color, target roughness, target reflection color, target highlight intensity and other parameters and the comparison effect diagram will be reflected, so that users can intuitively view the comparison before and after the switch; of course, users do not need to configure the target varnish color, target roughness, target reflection color, target highlight intensity and other parameters of the target coating. At this time, when the original coating is switched to the target coating, the base color, reflection color and highlight intensity of each area in the picture will be calculated one by one, and then the base color, reflection color and highlight intensity of each area will be rendered. Therefore, in the process of rendering the object model in the rendering progress bar, the dynamic changes of the base color, reflection color and highlight intensity are presented, making the rendering of the object model more natural and smooth.
[0148] Figure 13 FIG. 1 is a block diagram of a rendering device according to an exemplary embodiment. Figure 13 , the rendering device 1300 includes a coating module 1310 and a rendering module 1320 .
[0149] The coating module 1310 is configured to determine an original coating and a target coating of the object model; the original coating and the target coating are used to cover the outside of the object model;
[0150] The rendering module 1320 is configured to perform coating switching rendering on the object model in response to the operation of switching the object model from the original coating to the target coating; the area on the object model where the coating switching rendering has been completed displays the target coating, and the area on the object model where the coating switching rendering has not been completed maintains the original coating, and the coating switching rendering includes at least one of coating color switching, coating material switching, coating brightness switching, coating pattern switching and coating transparency switching.
[0151] In a possible embodiment, the rendering module 1320 is further configured to perform coating switching rendering on the object model according to a rendering progress bar in response to the operation of switching the object model from the original coating to the target coating; the area on one side of the rendering progress bar is the target coating, and the area on the other side is the original coating.
[0152] In a possible implementation, the rendering device 1300 further includes:
[0153] The progress bar position calculation module is configured to obtain the progress bar position of the rendering progress bar on the object model based on a curve function and a time ratio; the curve function is used to indicate the speed at which the rendering progress bar renders the object model, and the time ratio is the ratio of the rendering time already rendered by the rendering progress bar to the total rendering time.
[0154] In a possible implementation, the progress bar position includes progress bar coordinates; and the rendering device 1300 further includes:
[0155] The calculation module is configured to render a coating covering any area on the object model according to a size relationship between the coordinates of the area and the coordinates of the progress bar on the same coordinate axis.
[0156] In a possible implementation, the calculation module is further configured to render the coating covering the area as the target coating when the area coordinates are smaller than the progress bar coordinates.
[0157] In a possible implementation manner, the calculation module is further configured to keep the coating covering the area as the original coating when the coordinates of the area are greater than the coordinates of the progress bar.
[0158] In one possible embodiment, the object model is a vehicle model, the original coating includes original vehicle paint, and the target coating includes target vehicle paint; the rendering module 1320 is further configured to perform paint switch rendering on the vehicle model in response to an operation in which the vehicle model switches from the original vehicle paint to the target vehicle paint; the area on the vehicle model where the paint switch rendering is completed displays the target vehicle paint, and the area on the vehicle model where the paint switch rendering is not completed retains the original vehicle paint.
[0159] In a possible implementation, the coating color includes a reflection color of the coating; the rendering device 1300 further includes:
[0160] The reflection color rendering module is configured to determine, for any area on the object model, the reflection color of the coating rendered on the area based on the intersection between the reflection direction on the area and the environment reflection map; the reflection direction is symmetrical to the image acquisition direction, the image acquisition direction is the direction of the image acquisition device on the object model toward the area, and the environment reflection map is a spherical map of the environment in which the object model is located.
[0161] In a possible implementation, the coating brightness includes the highlight intensity of the coating; the rendering device 1300 further includes:
[0162] The highlight intensity rendering module is configured to determine, for any area on the object model, the highlight intensity of the coating rendered on the area based on the angle between the image acquisition direction and the normal on the area; the image acquisition direction is the direction of the image acquisition device on the object model toward the area.
[0163] In a possible implementation, the target coating is a coating of a real object corresponding to the object model or a coating set by a user.
[0164] In a possible implementation, the speed of rendering the object model is constant or changes dynamically.
[0165] Regarding the apparatus in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0166] The present disclosure also provides a computer-readable storage medium having computer program instructions stored thereon, which implement the steps of the rendering method provided by the present disclosure when the program instructions are executed by a processor.
[0167] Figure 14 1 is a block diagram illustrating a vehicle 1400 according to an exemplary embodiment. For example, vehicle 1400 may be a hybrid vehicle, a non-hybrid vehicle, an electric vehicle, a fuel cell vehicle, or another type of vehicle. Vehicle 1400 may be an autonomous vehicle, a semi-autonomous vehicle, or a non-autonomous vehicle.
[0168] Reference Figure 14 Vehicle 1400 may include various subsystems, such as an infotainment system 1410, a perception system 1420, a decision control system 1430, a drive system 1440, and a computing platform 1450. Vehicle 1400 may also include more or fewer subsystems, and each subsystem may include multiple components. Furthermore, each subsystem and each component of vehicle 1400 may be interconnected via wired or wireless means.
[0169] In some embodiments, the infotainment system 1410 may include a communication system, an entertainment system, a navigation system, and the like.
[0170] The perception system 1420 may include several sensors for sensing information about the environment surrounding the vehicle 1400. For example, the perception system 1420 may include a global positioning system (which may be a GPS system, a BeiDou system, or other positioning systems), an inertial measurement unit (IMU), a laser radar, a millimeter-wave radar, an ultrasonic radar, and a camera.
[0171] The decision control system 1430 may include a computing system, a vehicle controller, a steering system, a throttle, and a braking system.
[0172] Drive system 1440 may include components that provide power to vehicle 1400. In one embodiment, drive system 1440 may include an engine, a power source, a transmission system, and wheels. The engine may be an internal combustion engine, an electric motor, an air compression engine, or a combination thereof. The engine is capable of converting energy provided by the power source into mechanical energy.
[0173] Some or all functions of the vehicle 1400 are controlled by a computing platform 1450. The computing platform 1450 may include at least one processor 1451 and a memory 1452. The processor 1451 may execute instructions 1453 stored in the memory 1452.
[0174] The processor 1451 can be any conventional processor, such as a commercially available CPU. The processor can also include a graphics processor (GPU), a field programmable gate array (FPGA), a system on chip (SOC), an application specific integrated circuit (ASIC), or a combination thereof.
[0175] Memory 1452 can be implemented by any type of volatile or non-volatile memory device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0176] In addition to instructions 1453 , memory 1452 may also store data, such as road maps, route information, and vehicle location, direction, speed, etc. The data stored in memory 1452 may be used by computing platform 1450 .
[0177] In the embodiment of the present disclosure, the processor 1451 may execute the instruction 1453 to complete all or part of the steps of the above-mentioned rendering method.
[0178] Figure 15 1 is a block diagram illustrating a rendering device 1500 according to an exemplary embodiment. For example, rendering device 1500 may be a mobile phone, computer, digital broadcast terminal, messaging device, game console, tablet device, medical device, fitness equipment, personal digital assistant, speaker, keyboard, washing machine, mouse, cup, kettle, or other device with replaceable spray coating.
[0179] Reference Figure 15 , the device 1500 may include one or more of the following components: a processing component 1502 , a memory 1504 , a power component 1506 , a multimedia component 1508 , an audio component 1510 , an input / output interface 1512 , a sensor component 1514 , and a communication component 1515 .
[0180] Processing component 1502 generally controls the overall operation of device 1500, such as operations associated with display, phone calls, data communications, camera operation, and recording operations. Processing component 1502 may include one or more processors 1520 to execute instructions to perform all or part of the steps of the rendering method described above. In addition, processing component 1502 may include one or more modules to facilitate interaction between processing component 1502 and other components. For example, processing component 1502 may include a multimedia module to facilitate interaction between multimedia component 1508 and processing component 1502.
[0181] The memory 1504 is configured to store various types of data to support the operation of the device 1500. Examples of such data include instructions for any application or method operating on the device 1500, contact data, phone book data, messages, pictures, videos, etc. The memory 1504 can be implemented by any type of volatile or non-volatile storage device, or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk, or optical disk.
[0182] The power supply component 1506 provides power to the various components of the device 1500. The power supply component 1506 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the device 1500.
[0183] The multimedia component 1508 includes a screen that provides an output interface between the device 1500 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, slides, and gestures on the touch panel. The touch sensor can not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 1508 includes a front camera and / or a rear camera. When the device 1500 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera can receive external multimedia data. Each front camera and rear camera can be a fixed optical lens system or have focal length and optical zoom capabilities.
[0184] The audio component 1510 is configured to output and / or input audio signals. For example, the audio component 1510 includes a microphone (MIC) that is configured to receive external audio signals when the device 1500 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may be further stored in the memory 1504 or transmitted via the communication component 1515. In some embodiments, the audio component 1510 further includes a speaker for outputting audio signals.
[0185] The input / output interface 1512 provides an interface between the processing component 1502 and peripheral interface modules, such as a keyboard, a click wheel, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.
[0186] Sensor assembly 1514 includes one or more sensors for providing various aspects of the status assessment of device 1500. For example, sensor assembly 1514 can detect the open / closed state of device 1500, the relative positioning of components, such as the display and keypad of device 1500. Sensor assembly 1514 can also detect changes in the position of device 1500 or a component of device 1500, the presence or absence of user contact with device 1500, the orientation or acceleration / deceleration of device 1500, and changes in the temperature of device 1500. Sensor assembly 1514 can include a proximity sensor configured to detect the presence of nearby objects without any physical contact. Sensor assembly 1514 can also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, sensor assembly 1514 can also include an accelerometer, a gyroscope, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0187] The communication component 1515 is configured to facilitate wired or wireless communication between the device 1500 and other devices. The device 1500 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 1515 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 1515 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0188] In an exemplary embodiment, the device 1500 can be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above-mentioned rendering method.
[0189] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 1504 including instructions, which can be executed by the processor 1520 of the device 1500 to perform the above rendering method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0190] In another exemplary embodiment, a computer program product is further provided. The computer program product includes a computer program executable by a programmable device, and the computer program has a code portion for executing the above rendering method when executed by the programmable device.
[0191] Some embodiments of the present disclosure also provide a chip system, such as Figure 16 As shown, the chip system includes at least one processor 1601 and at least one interface circuit 1602. The processor 1601 and the interface circuit 1602 can be interconnected via lines. For example, the interface circuit 1602 can be used to receive signals from other devices (such as the memory of an electronic device). For another example, the interface circuit 1602 can be used to send signals to other devices (such as the processor 1601). Exemplarily, the interface circuit 1602 can read the instructions stored in the memory and send the instructions to the processor 1601. When the instructions are executed by the processor 1601, the rendering device can be caused to perform the various steps in the above embodiments. Of course, the chip system can also include other discrete devices, and some embodiments of the present disclosure are not specifically limited to this.
[0192] In some embodiments of the present disclosure, the interface circuit 1602 can obtain data, program instructions and / or information from the internal storage area of the chip system; it can also obtain data, program instructions and / or information from outside the chip system.
[0193] Optionally, the chip system may further include a memory for storing necessary computer programs and data.
[0194] Those skilled in the art will also appreciate that the various illustrative logical blocks and steps listed in the embodiments of the present application can be implemented by electronic hardware, computer software, or a combination of both. Whether such functions are implemented by hardware or software depends on the specific application and the design requirements of the entire system. Those skilled in the art may use various methods to implement the described functions for each specific application, but such implementation should not be construed as exceeding the scope of protection of the embodiments of the present application.
Claims
1. A rendering method, characterized in that: The rendering method is used to render an object model, and the rendering method includes: Determining an original coating and a target coating of the object model; the original coating and the target coating are used to cover the outside of the object model; In response to the operation of switching the object model from the original coating to the target coating, coating switching rendering is performed on the object model; the area on the object model where the coating switching rendering has been completed displays the target coating, and the area on the object model where the coating switching rendering has not been completed retains the original coating, and the coating switching rendering includes at least one of coating color switching, coating material switching, coating brightness switching, coating pattern switching and coating transparency switching.
2. The rendering method according to claim 1, wherein: In response to the object model being switched from the original coating to the target coating, performing coating switching rendering on the object model includes: In response to the operation of switching the object model from the original coating to the target coating, the object model is subjected to coating switching rendering according to a rendering progress bar; the area on one side of the rendering progress bar is the target coating, and the area on the other side is the original coating.
3. The rendering method according to claim 2, wherein: The method further comprises: According to the curve function and the time proportion, the progress bar position of the rendering progress bar on the object model is obtained; the curve function is used to indicate the speed at which the rendering progress bar renders the object model, and the time proportion is the proportion of the rendering time already rendered by the rendering progress bar to the total rendering time.
4. The rendering method according to claim 3, characterized in that: The position of the progress bar is used to determine the coordinates of the progress bar; the method further includes: For any region on the object model, a coating covering the region is rendered according to a size relationship between the region coordinates and the progress bar coordinates on the same coordinate axis.
5. The rendering method according to claim 4, characterized in that: The step of rendering a coating covering any area on the object model according to a size relationship between the coordinates of the area and the coordinates of the progress bar on the same coordinate axis includes: When the coordinates of the region are smaller than the coordinates of the progress bar, the coating layer covering the region is rendered as the target coating layer.
6. The rendering method according to claim 4, characterized in that: The step of rendering a coating covering any area on the object model according to a size relationship between the coordinates of the area and the coordinates of the progress bar on the same coordinate axis includes: When the coordinates of the region are greater than the coordinates of the progress bar, the coating layer covering the region is maintained as the original coating layer.
7. The rendering method according to claim 1, wherein: The object model is a vehicle model, the original coating layer includes original vehicle paint, and the target coating layer includes target vehicle paint; In response to the object model being switched from the original coating to the target coating, performing coating switching rendering on the object model includes: In response to an operation of switching the vehicle model from the original paint to the target paint, performing paint switching rendering on the vehicle model; The area on the vehicle model where the paint switching rendering is completed displays the target paint, and the area on the vehicle model where the paint switching rendering is not completed retains the original paint.
8. The rendering method according to claim 1, wherein: The coating color includes a reflected color of the coating; the method further comprising: For any area on the object model, the reflection color of the coating rendered on the area is determined based on the intersection between the reflection direction on the area and the environment reflection map; the reflection direction is symmetrical to the image acquisition direction, the image acquisition direction is the direction of the image acquisition device on the object model toward the area, and the environment reflection map is a spherical map of the environment in which the object model is located.
9. The rendering method according to claim 1, wherein: The coating brightness includes the highlight intensity of the coating; the method further comprising: For any area on the object model, the highlight intensity of the coating rendered on the area is determined based on the angle between the image acquisition direction on the area and the normal; the image acquisition direction is the direction of the image acquisition device on the object model toward the area.
10. The rendering method according to any one of claims 1 to 9, characterized in that: The target coating is a coating of a real object corresponding to the object model or a coating set by a user.
11. The rendering method according to any one of claims 1 to 9, characterized in that: The speed of rendering the object model is constant or dynamically changed.
12. A rendering device, characterized in that: The rendering device is used to render the object model, and the rendering device includes: A coating module is configured to determine an original coating and a target coating of the object model; the original coating and the target coating are used to cover the outside of the object model; A rendering module is configured to perform coating switching rendering on the object model in response to an operation in which the object model switches from the original coating to the target coating; an area on the object model where the coating switching rendering has been completed displays the target coating, and an area on the object model where the coating switching rendering has not been completed maintains the original coating, wherein the coating switching rendering includes at least one of coating color switching, coating material switching, coating brightness switching, coating pattern switching, and coating transparency switching.
13. The device according to claim 12, characterized in that The rendering module is further configured to perform coating switching rendering on the object model according to a rendering progress bar in response to an operation of switching the object model from the original coating to the target coating; the area on one side of the rendering progress bar is the target coating, and the area on the other side is the original coating.
14. The device according to claim 13, characterized in that The rendering device further includes: The progress bar position calculation module is configured to obtain the progress bar position of the rendering progress bar on the object model based on a curve function and a time ratio; the curve function is used to indicate the speed at which the rendering progress bar renders the object model, and the time ratio is the ratio of the rendering time already rendered by the rendering progress bar to the total rendering time.
15. The device according to claim 14, characterized in that The position of the progress bar is used to determine the coordinates of the progress bar; the rendering device further includes: The calculation module is configured to render a coating covering any area on the object model according to a size relationship between the coordinates of the area and the coordinates of the progress bar on the same coordinate axis.
16. The device according to any one of claims 12 to 15, characterized in that The speed of rendering the object model is constant or dynamically changed.
17. A rendering device, characterized in that: include: processor; a memory for storing processor-executable instructions; Wherein, the processor is configured to: Execute the rendering method according to any one of claims 1 to 11.
18. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the rendering method according to any one of claims 1 to 11 is implemented.
19. A computer program product, characterized in that The invention comprises a computer program, which implements the rendering method according to any one of claims 1 to 11 when executed by a processor.