Vehicle model rendering method, device, storage medium and electronic device

By Fourier transforming the real-time light and shadow data of the vehicle model, the underwater jitter data set is generated and rendered, the problem of low real-time rendering efficiency of vehicle models in the prior art is solved, and efficient underwater rendering effect is achieved.

CN117475050BActive Publication Date: 2025-02-14LIJIE SHANGHAI INFORMATION TECH LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202311296653.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-10-08
Publication Date
2025-02-14
Estimated Expiration
2043-10-08

AI Technical Summary

Technical Problem

The prior art cannot realize real-time rendering of vehicle models, and the rendering efficiency is low, and multiple renderings are required to achieve the desired rendering effect.

Method used

By determining the real-time light and shadow data of the vehicle model, Fourier transform processing is performed to obtain the underwater jitter data set, and render it to obtain the vehicle rendering model. This method uses Fourier transform to process real-time light and shadow data, generates a data set for characterizing the refractive jitter effect of vehicle models underwater, and realizes the refractive jitter effect at different water depths through one rendering.

Benefits of technology

Real-time rendering of vehicle models is realized, rendering efficiency is improved, and refraction jitter effect can be achieved at different water depths through one rendering, improving the fidelity of the rendering effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117475050B_ABST
    Figure CN117475050B_ABST
Patent Text Reader

Abstract

The present disclosure relates to a vehicle model rendering method, device, storage medium and electronic device, wherein the method steps include: determining a vehicle model; determining a target data set according to the vehicle model; performing Fourier transform processing on the target data set to obtain an underwater jitter data set, wherein the data in the underwater jitter data set is used to characterize the refraction jitter amplitude of each mesh vertex data after the vehicle model is under a simulated water level line, and the refraction jitter amplitude of the mesh vertex data at different distances after the Fourier transform is different, and the distance is the distance between the mesh vertex data and the simulated water level line; rendering the underwater jitter data set to obtain a vehicle rendering model. The vehicle model can be rendered in real time, and the rendering efficiency of the vehicle model can be improved at the same time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of rendering technology, and in particular, to a vehicle model rendering method, device, storage medium and electronic device. Background Art

[0002] In the related art, the vehicle model is rendered by a delayed pipeline rendering method or an offline rendering method. However, when the vehicle model is rendered by this method, real-time rendering cannot be performed, and the vehicle model needs to be rendered multiple times to achieve the required rendering effect, thereby resulting in low rendering efficiency. Summary of the invention

[0003] The purpose of the present disclosure is to provide a vehicle model rendering method, device, storage medium and electronic device to solve the above-mentioned related technical problems.

[0004] In order to achieve the above objectives, in a first aspect, the present disclosure provides a vehicle model rendering method, the method comprising:

[0005] Determine a vehicle model, wherein the vehicle model is a 3D animation model simulating a vehicle partially in water;

[0006] Determine a target data set according to the vehicle model, wherein the data in the target data set is real-time light and shadow data of the vehicle model;

[0007] Performing Fourier transform processing on the target data set to obtain an underwater jitter data set, wherein the data in the underwater jitter data set is used to characterize the refraction jitter amplitude of each mesh vertex data after transformation when the vehicle model is under a simulated water level line, the mesh vertex data at different distances have different refraction jitter amplitudes after the Fourier transform, and the distance is the distance between the mesh vertex data and the simulated water level line;

[0008] The underwater jitter data set is rendered to obtain a vehicle rendering model.

[0009] Optionally, determining a target data set according to the vehicle model includes:

[0010] Performing mesh processing on the vehicle model to obtain a first data set, wherein the first data set is a set of mesh vertex data of the vehicle model below the simulated water level;

[0011] The first data set is processed in real time by using a precision matching algorithm and an ambient occlusion algorithm to obtain the target data set.

[0012] Optionally, the performing grid processing on the vehicle model to obtain the first data set includes:

[0013] Dividing the vehicle model into a plurality of grids, and adding corresponding material information to each of the grids to obtain a vehicle grid model;

[0014] Determining a target grid located below the simulated water level according to the vehicle grid model;

[0015] The mesh vertex data corresponding to the target mesh are combined into the first data set.

[0016] Optionally, rendering the underwater jitter dataset to obtain a vehicle rendering model includes:

[0017] Determining real-time grid data according to the underwater jitter data set;

[0018] Determine corresponding material information according to the real-time grid data;

[0019] According to the material information, the underwater jitter dataset is rendered by a pipeline rendering method to obtain the vehicle rendering model.

[0020] Optionally, the performing real-time processing on the first data set by using a precision matching algorithm and an ambient occlusion algorithm to obtain the target data set includes:

[0021] Removing invalid data from the first data set by a precision matching method to obtain a second data set;

[0022] The second data set is processed in real time by an ambient occlusion algorithm to obtain the target data set to display real-time light and shadow of the vehicle model.

[0023] Optionally, rendering the underwater jitter dataset to obtain a vehicle rendering model includes:

[0024] The vehicle model is rendered by a pixel shader according to the underwater jitter data set to obtain the vehicle rendering model.

[0025] In a second aspect, the present disclosure provides a vehicle model rendering device, including a first determination module, a second determination module, a first processing module, and a rendering module;

[0026] The first determination module is used to determine a vehicle model, wherein the vehicle model is a 3D animation model simulating a vehicle partially in water;

[0027] The second determination module is used to determine a real-time target data set according to the vehicle model, wherein the data in the target data set is real-time light and shadow data of the vehicle model;

[0028] The first processing module is used to perform Fourier transform processing on the target data set to obtain an underwater jitter data set, wherein the data in the underwater jitter data set is used to characterize the refraction jitter amplitude of each mesh vertex data after transformation when the vehicle model is under a simulated water level line, and the mesh vertex data at different distances have different refraction jitter amplitudes after the Fourier transform, and the distance is the distance between the mesh vertex data and the simulated water level line;

[0029] The rendering module is used to render the underwater jitter data set to obtain a vehicle rendering model.

[0030] Optionally, the second determining module includes a second processing module and a third processing module;

[0031] The second processing module is used to perform mesh processing on the vehicle model to obtain a first data set, where the first data set is a set of mesh vertex data of the vehicle model below the simulated water level;

[0032] The third processing module is used to process the first data set in real time through a precision matching algorithm and an ambient occlusion algorithm to obtain the target data set.

[0033] Optionally, the second processing module includes:

[0034] A first sub-determination module, used for dividing the vehicle model into a plurality of regions and determining material information of each of the regions;

[0035] A mesh division module, used for meshing the corresponding area according to the material information of each area to obtain a vehicle mesh model;

[0036] A second sub-determination module is used to determine a target grid located below the simulated water level according to the vehicle grid model;

[0037] The combining module is used to combine the mesh vertex data corresponding to the target mesh into the first data set.

[0038] Optionally, the rendering module includes:

[0039] A third sub-determination module is used to determine real-time grid data according to the underwater jitter data set;

[0040] A fourth sub-determination module, used to determine corresponding material information according to the real-time grid data;

[0041] The sub-rendering module is used to render the underwater jitter data set through a pipeline rendering method according to the material information to obtain the vehicle rendering model.

[0042] Optionally, the third processing module includes:

[0043] A data extraction module, used to remove invalid data from the first data set by using a precision matching method to obtain a second data set;

[0044] The sub-processing module is used to process the second data set in real time through an ambient occlusion algorithm to obtain the target data set to display the real-time light and shadow of the vehicle model.

[0045] Optionally, the rendering module is used to render the vehicle model through a pixel shader according to the underwater jitter data set to obtain the vehicle rendering model.

[0046] In a third aspect, the present disclosure provides a non-temporary computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any one of the methods provided in the first aspect of the present disclosure.

[0047] In a fourth aspect, the present disclosure provides an electronic device, including:

[0048] a memory having a computer program stored thereon;

[0049] A processor is used to execute the computer program in the memory to implement the steps of any one of the methods provided in the first aspect of the present disclosure.

[0050] Through the above technical solution, the target data set can be Fourier transformed to obtain an underwater jitter data set, and then the underwater jitter data set can be rendered to obtain a vehicle rendering model. Among them, the data in the target data set is the real-time light and shadow data of the vehicle model, so that the vehicle model can be rendered in real time, improving the rendering efficiency of the vehicle model. In addition, the data in the underwater jitter data set is used to characterize the refraction jitter amplitude of each mesh vertex data after the vehicle model is under the simulated water level line, and the refraction jitter amplitude of the mesh vertex data at different distances after Fourier transformation is different, and the distance is the distance between the mesh vertex data and the simulated water level line. In this way, the refraction jitter effect at different water depths can be achieved, and a more realistic underwater rendering effect can be achieved. In addition, the refraction jitter effect at different water depths can be achieved through one rendering, thereby improving the rendering efficiency.

[0051] Other features and advantages of the present disclosure will be described in detail in the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] The accompanying drawings are used to provide a further understanding of the present disclosure and constitute a part of the specification. Together with the following specific embodiments, they are used to explain the present disclosure but do not constitute a limitation of the present disclosure. In the accompanying drawings:

[0053] Figure 1 is a schematic diagram showing a vehicle model rendering method according to an exemplary embodiment of the present disclosure.

[0054] Figure 2 The figure shows a schematic diagram of a vehicle rendering model according to an exemplary embodiment of the present disclosure.

[0055] Figure 3 It is a schematic diagram of a vehicle model rendered based on relevant technology.

[0056] Figure 4 The figure is a schematic diagram showing a vehicle model rendering device according to an exemplary embodiment of the present disclosure.

[0057] Figure 5 It is a block diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION

[0058] The specific implementation of the present disclosure is described in detail below in conjunction with the accompanying drawings. It should be understood that the specific implementation described herein is only used to illustrate and explain the present disclosure, and is not used to limit the present disclosure.

[0059] It should be noted that all actions of acquiring signals, information or data in the present disclosure are carried out in compliance with the relevant data protection laws and policies of the country where the device is located and with the authorization given by the owner of the corresponding device.

[0060] In the related art, the vehicle model is usually rendered by a deferred pipeline rendering method or an offline rendering method. Among them, the deferred pipeline rendering method extracts the depth and normal information of the vehicle model below the simulated water level, and calculates the reflection and refraction effects of the vehicle model on the surface of the water level based on the depth and normal information, and then renders the vehicle model based on the reflection and refraction effects. The offline rendering method usually calculates the refractive index and incident angle of each data point of the vehicle model below the simulated water level, and uses path tracing rays to render the vehicle model based on the refractive index and incident angle.

[0061] The inventors have found that when a delayed pipeline rendering method or an offline rendering method is used to render a vehicle model, real-time rendering cannot be performed, and the vehicle model needs to be rendered multiple times to achieve the required rendering effect, and the rendering efficiency is low.

[0062] In view of this, the present disclosure provides a vehicle model rendering method, device, storage medium and electronic device to at least solve the problem that the related technology cannot render the vehicle model in real time and the rendering efficiency is low.

[0063] like Figure 1 As shown, Figure 1is a schematic diagram showing a vehicle model rendering method according to an exemplary embodiment of the present disclosure, referring to Figure 1 The rendering method is used to render the vehicle model, including:

[0064] S101: Determine a vehicle model, where the vehicle model is a 3D animation model simulating a portion of the vehicle being in water;

[0065] S102: determining a target data set according to the vehicle model, where the data in the target data set is real-time light and shadow data of the vehicle model;

[0066] S103: Performing Fourier transform processing on the target data set to obtain an underwater jitter data set, wherein the data in the underwater jitter data set is used to characterize the refraction jitter amplitude of each mesh vertex data after transformation when the vehicle model is under a simulated water level line, and the refraction jitter amplitude of mesh vertex data at different distances after Fourier transform is different, and the distance is the distance between the mesh vertex data and the simulated water level line;

[0067] S104: Rendering the underwater jitter dataset to obtain a vehicle rendering model.

[0068] Through the above technical solution, the target data set can be Fourier transformed to obtain an underwater jitter data set, and then the underwater jitter data set can be rendered to obtain a vehicle rendering model. Among them, the data in the target data set is the real-time light and shadow data of the vehicle model, so that the vehicle model can be rendered in real time, improving the rendering efficiency of the vehicle model. In addition, the data in the underwater jitter data set is used to characterize the refraction jitter amplitude of each mesh vertex data after the vehicle model is under the simulated water level line, and the refraction jitter amplitude of the mesh vertex data at different distances after Fourier transformation is different, and the distance is the distance between the mesh vertex data and the simulated water level line. In this way, the refraction jitter effect at different water depths can be achieved, and a more realistic underwater rendering effect can be achieved. In addition, the refraction jitter effect at different water depths can be achieved by rendering in sequence, thereby improving the rendering efficiency.

[0069] In order to enable those skilled in the art to better understand the vehicle model rendering method provided by the present disclosure, the above steps are described in detail with examples below.

[0070] For example, the vehicle model may be a virtual 3D animation model generated in the client software, and part of the vehicle model is below the simulated water level. The 3D animation model may be an FBS (Function-Behavior-Structure) model, and the FBS model may be a mapping model of the vehicle. By placing part of the vehicle model below the simulated water level, the refraction and shaking effect of the vehicle under water may be simulated, thereby improving the three-dimensional authenticity of the rendered vehicle model.

[0071] For example, a target data set may be determined by the vehicle model. The target data set may be used to represent real-time light and shadow data of the vehicle model, and the target data set may be obtained by processing mesh vertex data of the vehicle model.

[0072] In a possible manner, the target data set is determined according to the vehicle model, including:

[0073] Performing mesh processing on the vehicle model to obtain a first data set, where the first data set is a collection of mesh vertex data of the vehicle model below a simulated water level line;

[0074] The first data set is processed in real time by using a precision matching algorithm and an ambient occlusion algorithm to obtain a target data set.

[0075] It should be understood that in the vehicle model, the material used in each position is different. For example, the material information of the tire part is rubber, the material information of the shell is metal, and the material information of the lampshade is glass. The materials rendered for different material information are different, and the materials rendered for the same material information are the same. The disclosed embodiment can divide the vehicle model into multiple grids, and then add corresponding material information to the corresponding grids.

[0076] That is to say, in a possible manner, performing grid processing on the vehicle model to obtain the first data set may include:

[0077] Dividing the vehicle model into a plurality of grids, and adding corresponding material information to each of the grids to obtain a vehicle grid model;

[0078] According to the vehicle grid model, determine the target grid under the simulated water level line;

[0079] The mesh vertex data corresponding to the target mesh are combined into a first data set.

[0080] When meshing the vehicle model, the vehicle model can be evenly divided according to a fixed number of grids, wherein the fixed number of grids can be 25w. After the mesh is divided, the corresponding material information is added according to the area where the grid is located. For example, in the shell area of ​​the vehicle model, metal material information can be added to the grid corresponding to the shell area; in the tire area of ​​the vehicle model, rubber material information can be added to the grid corresponding to the tire area; in the lampshade area of ​​the vehicle model, glass material information can be added to the grid corresponding to the lampshade area. After the material information corresponding to each grid is added, the vehicle mesh model is obtained. In the vehicle mesh model, the mesh of the vehicle model below the simulated water level line can be used as the target mesh, and then the set of mesh vertex data corresponding to the target mesh is combined into a first data set. Among them, the mesh vertex data can be the vertex coordinate data of each mesh, and the coordinate data can be world coordinate system data.

[0081] In the above manner, the vehicle mesh model can be obtained by adding corresponding material information to each mesh, which can improve the accuracy of the rendering effect and increase the rendering rate.

[0082] After obtaining the first data set, the first data set can be processed in real time by the precision matching algorithm and the ambient occlusion algorithm in sequence to obtain a target data set, where the data in the target data set is the real-time light and shadow data of the vehicle model.

[0083] In a possible manner, performing real-time processing on the first data set by using a precision matching algorithm and an ambient occlusion algorithm to obtain a target data set may include:

[0084] Removing invalid data from the first data set by a precision matching method to obtain a second data set;

[0085] The second data set is processed in real time by an ambient occlusion algorithm to obtain a target data set to display real-time light and shadow of the vehicle model.

[0086] It should be understood that invalid data may exist in the first data set during the rendering process. Invalid data may be data that does not need to be processed during the rendering process. For example, invalid data may be data that does not reflect the outline of the relevant area in the shell area, tire area, or lampshade area of ​​the vehicle model. If the invalid data is not removed, the efficiency of processing data will be reduced, which will lead to reduced rendering efficiency and increased data storage space. Therefore, the embodiment of the present disclosure can remove the invalid data in the first data set through the precision matching method to obtain the second data set, so that subsequent processing is based on the second data set to improve the rendering rate while reducing the data storage space.

[0087] Afterwards, the second data set may be processed by an ambient occlusion algorithm, and the processing process may be to first illuminate the vehicle model by a luminous light source to obtain a shadow part and a bright part of the vehicle model, and then distinguish the dents existing in the vehicle model by the shadow part and the bright part, thereby making the three-dimensionality of the vehicle model more realistic. The luminous light source may be a sunlight light source or a lamp light source.

[0088] After obtaining the target data set, the target data set can be processed by the Fourier transform method, so as to convert the data in the target data set into the refraction jitter amplitude below the simulated water level. The specific details of the Fourier transform method can refer to the relevant technology and will not be repeated here. For example, the target data set can be processed by the Fourier transform in the vertex shader to obtain the underwater jitter data set, which is not specifically limited in this embodiment.

[0089] The data in the underwater jitter data set is used to characterize the refraction jitter amplitude of each mesh vertex data after the vehicle model is transformed under the simulated water level line, and the refraction jitter amplitude of the mesh vertex data at different distances after Fourier transform is different. In practical applications, the farther the mesh vertex data is from the simulated water level line, the greater its refraction jitter amplitude after Fourier transform. That is, by converting the target data set into an underwater jitter data set through Fourier transform, the refraction jitter effect of the vehicle model below the water level line in the water can be simulated. In this way, the refraction jitter effect at different water depths can be achieved, and a more realistic underwater rendering effect can be achieved. Moreover, the refraction jitter effect at different water depths can be achieved through one rendering, thereby improving rendering efficiency.

[0090] In one possible manner, rendering the underwater jitter dataset to obtain a vehicle rendering model includes: rendering the vehicle model through a pixel shader according to the underwater jitter dataset to obtain the vehicle rendering model. The pixel shader may include a pixel shader instruction for rendering the vehicle model, and the instruction is executed when the vehicle model is rendered. In the embodiment of the present disclosure, rendering the vehicle model through a pixel shader can improve the rendering efficiency of the vehicle model.

[0091] In another possible manner, the underwater jitter dataset is rendered to obtain a vehicle rendering model, including:

[0092] Determine real-time grid data based on underwater jitter data set;

[0093] Determine the corresponding material information based on the real-time grid data;

[0094] According to the material information, the underwater jitter dataset is rendered through the pipeline rendering method to obtain the vehicle rendering model.

[0095] It should be understood that when rendering the underwater jitter dataset, the material information corresponding to each grid can be determined first, and then the rendering can be performed according to the material information. First, the current real-time grid data can be determined according to the underwater jitter dataset, and the material information corresponding to the grid can be determined according to the real-time grid data. Finally, the corresponding underwater jitter dataset can be rendered through the pipeline rendering method according to the material information to obtain a vehicle rendering model.

[0096] Reference Figure 2 and Figure 3 , Figure 2 is a schematic diagram showing a vehicle rendering model according to an exemplary embodiment of the present disclosure, Figure 3 This is a schematic diagram of a vehicle model rendered based on relevant technology. Figure 2 and Figure 3 As shown, Figure 2 You can clearly see the refraction and jitter effect of the vehicle rendering model below the simulated water level. Figure 3 The refraction jitter effect of the vehicle rendering model below the simulated water level cannot be clearly seen. That is to say, compared with the related art, the vehicle model rendering method provided by the present disclosure can achieve the refraction jitter effect at different water depths and achieve a more realistic underwater rendering effect.

[0097] Through any of the above schemes, the target data set can be Fourier transformed to obtain an underwater jitter data set, and then the underwater jitter data set can be rendered to obtain a vehicle rendering model. Among them, the data in the target data set is the real-time light and shadow data of the vehicle model, so that the vehicle model can be rendered in real time, improving the rendering efficiency of the vehicle model. In addition, the data in the underwater jitter data set is used to characterize the refraction jitter amplitude of each mesh vertex data after the vehicle model is under the simulated water level line, and the refraction jitter amplitude of the mesh vertex data at different distances after Fourier transformation is different, and the distance is the distance between the mesh vertex data and the simulated water level line. Therefore, the refraction jitter effect at different water depths can be achieved through one rendering, thereby improving the rendering efficiency and rendering effect. That is to say, any scheme provided by the present disclosure can better restore the physical reality of the rendering while ensuring the rendering power consumption and rendering effect.

[0098] Based on the same concept, the present disclosure provides a vehicle model rendering device, including a first determination module, a second determination module, a first processing module and a rendering module;

[0099] A first determination module is used to determine a vehicle model, where the vehicle model is a 3D animation model simulating a portion of the vehicle being in water;

[0100] A second determination module is used to determine a real-time target data set according to the vehicle model, wherein the data in the target data set is real-time light and shadow data of the vehicle model;

[0101] A first processing module is used to perform Fourier transform processing on the target data set to obtain an underwater jitter data set, wherein the data in the underwater jitter data set is used to characterize the refraction jitter amplitude of each mesh vertex data after transformation when the vehicle model is under a simulated water level line, and the refraction jitter amplitude of mesh vertex data at different distances after Fourier transform is different, and the distance is the distance between the mesh vertex data and the simulated water level line;

[0102] The rendering module is used to render the underwater jitter dataset to obtain a vehicle rendering model.

[0103] Optionally, the second determining module includes a second processing module and a third processing module;

[0104] A second processing module is used to perform mesh processing on the vehicle model to obtain a first data set, where the first data set is a collection of mesh vertex data of the vehicle model below a simulated water level;

[0105] The third processing module is used to process the first data set in real time through a precision matching algorithm and an ambient occlusion algorithm to obtain a target data set.

[0106] Optionally, the second processing module includes:

[0107] The first sub-determination module is used to divide the vehicle model into multiple grids and add corresponding material information to each grid to obtain a vehicle grid model;

[0108] The second sub-determination module is used to determine the target grid under the simulated water level line according to the vehicle grid model;

[0109] The combining module is used to combine the mesh vertex data corresponding to the target mesh into a first data set.

[0110] Optionally, the rendering module includes:

[0111] A third sub-determination module is used to determine the real-time grid data according to the underwater jitter data set;

[0112] The fourth sub-determination module is used to determine the corresponding material information according to the real-time grid data;

[0113] The sub-rendering module is used to render the underwater jitter data set through a pipeline rendering method according to the material information to obtain a vehicle rendering model.

[0114] Optionally, the third processing module includes:

[0115] A data extraction module, used to remove invalid data from the first data set by using a precision matching method to obtain a second data set;

[0116] The sub-processing module is used to process the second data set in real time through an ambient occlusion algorithm to obtain a target data set to display real-time light and shadow of the vehicle model.

[0117] Optionally, the rendering module is used to render the vehicle model through a pixel shader according to the underwater jitter data set to obtain a vehicle rendering model.

[0118] Regarding the device 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.

[0119] Based on the same concept, the present disclosure provides a non-transitory computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the steps of the vehicle model rendering method provided by the present disclosure are implemented.

[0120] Based on the same concept, the present disclosure provides an electronic device, including:

[0121] a memory having a computer program stored thereon;

[0122] The processor is used to execute the computer program in the memory to implement the steps of the vehicle model rendering method provided by the present disclosure.

[0123] Figure 5 FIG. 5 is a block diagram of an electronic device 500 according to an exemplary embodiment. Figure 5 As shown, the electronic device 500 may include: a processor 501 and a memory 502. The electronic device 500 may also include one or more of a multimedia component 503, an input / output (I / O) interface 504, and a communication component 505.

[0124] The processor 501 is used to control the overall operation of the electronic device 500 to complete all or part of the steps in the above-mentioned vehicle model rendering method. The memory 502 is used to store various types of data to support the operation of the electronic device 500, and these data may include, for example, instructions for any application or method used to operate on the electronic device 500, and application-related data, such as contact data, sent and received messages, pictures, audio, video, etc. The memory 502 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (Static Random Access Memory, referred to as SRAM), electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, referred to as EEPROM), erasable programmable read-only memory (Erasable Programmable Read-Only Memory, referred to as EPROM), programmable read-only memory (Programmable Read-Only Memory, referred to as PROM), read-only memory (Read-Only Memory, referred to as ROM), magnetic memory, flash memory, magnetic disk or optical disk. The multimedia component 503 may include a screen and an audio component. The screen may be, for example, a touch screen, and the audio component is used to output and / or input audio signals. For example, the audio component may include a microphone for receiving external audio signals. The received audio signal may be further stored in the memory 502 or sent through the communication component 505. The audio component also includes at least one speaker for outputting audio signals. The I / O interface 504 provides an interface between the processor 501 and other interface modules, and the above-mentioned other interface modules may be keyboards, mice, buttons, etc. These buttons may be virtual buttons or physical buttons. The communication component 505 is used for wired or wireless communication between the electronic device 500 and other devices. Wireless communication, such as Wi-Fi, Bluetooth, Near Field Communication (NFC), 2G, 3G, 4G, NB-IOT, eMTC, or other 5G, etc., or a combination of one or more of them, is not limited here. Therefore, the corresponding communication component 505 may include: Wi-Fi module, Bluetooth module, NFC module, etc.

[0125] In an exemplary embodiment, the electronic device 500 can be implemented by one or more application specific integrated circuits (ASIC), digital signal processors (DSP), digital signal processing devices (DSPD), programmable logic devices (PLD), field programmable gate arrays (FPGA), controllers, microcontrollers, microprocessors or other electronic components to execute the above-mentioned vehicle model rendering method.

[0126] In another exemplary embodiment, a computer-readable storage medium including program instructions is also provided, and when the program instructions are executed by a processor, the steps of the above-mentioned vehicle model rendering method are implemented. For example, the computer-readable storage medium can be the above-mentioned memory 502 including program instructions, and the above-mentioned program instructions can be executed by the processor 501 of the electronic device 500 to complete the above-mentioned vehicle model rendering method.

[0127] The preferred embodiments of the present disclosure are described in detail above in conjunction with the accompanying drawings; however, the present disclosure is not limited to the specific details in the above embodiments. Within the technical concept of the present disclosure, a variety of simple modifications can be made to the technical solution of the present disclosure, and these simple modifications all fall within the protection scope of the present disclosure.

[0128] It should also be noted that the various specific technical features described in the above specific embodiments can be combined in any suitable manner without contradiction. In order to avoid unnecessary repetition, the present disclosure will not further describe various possible combinations.

[0129] In addition, various embodiments of the present disclosure may be arbitrarily combined, and as long as they do not violate the concept of the present disclosure, they should also be regarded as the contents disclosed by the present disclosure.

Claims

1. A vehicle model rendering method, characterized in that: The method comprises: Determine a vehicle model, wherein the vehicle model is a 3D animation model simulating a vehicle partially in water; Determine a target data set according to the vehicle model, wherein the data in the target data set is real-time light and shadow data of the vehicle model; Performing Fourier transform processing on the target data set to obtain an underwater jitter data set, wherein the data in the underwater jitter data set is used to characterize the refraction jitter amplitude of each mesh vertex data after transformation when the vehicle model is under a simulated water level line, the mesh vertex data at different distances have different refraction jitter amplitudes after the Fourier transform, and the distance is the distance between the mesh vertex data and the simulated water level line; Rendering the vehicle model according to the underwater jitter data set to obtain a vehicle rendering model; Determining a target data set according to the vehicle model includes: Dividing the vehicle model into a plurality of grids, and adding corresponding material information to each of the grids to obtain a vehicle grid model; Determining a target grid located below the simulated water level according to the vehicle grid model; combining mesh vertex data corresponding to the target mesh into a first data set, wherein the first data set is a set of mesh vertex data of the vehicle model below the simulation water level; The first data set is processed in real time by using a precision matching algorithm and an ambient occlusion algorithm to obtain the target data set.

2. The method according to claim 1, characterized in that The step of rendering the vehicle model according to the underwater jitter data set to obtain a vehicle rendering model includes: Determining real-time grid data according to the underwater jitter data set; Determine corresponding material information according to the real-time grid data; According to the material information, the underwater jitter dataset is rendered by a pipeline rendering method to obtain the vehicle rendering model.

3. The method according to claim 1 or 2, characterized in that: The step of performing real-time processing on the first data set by using a precision matching algorithm and an ambient occlusion algorithm to obtain the target data set includes: Removing invalid data from the first data set by a precision matching method to obtain a second data set; The second data set is processed in real time by an ambient occlusion algorithm to obtain the target data set to display real-time light and shadow of the vehicle model.

4. The method according to claim 1 or 2, characterized in that: The step of rendering the vehicle model according to the underwater jitter data set to obtain a vehicle rendering model includes: The vehicle model is rendered by a pixel shader according to the underwater jitter data set to obtain the vehicle rendering model.

5. A vehicle model rendering device, characterized in that: It includes a first determining module, a second determining module, a first processing module and a rendering module; The first determination module is used to determine a vehicle model, wherein the vehicle model is a 3D animation model simulating a vehicle partially in water; The second determination module is used to determine a real-time target data set according to the vehicle model, wherein the data in the target data set is real-time light and shadow data of the vehicle model; The first processing module is used to perform Fourier transform processing on the target data set to obtain an underwater jitter data set, wherein the data in the underwater jitter data set is used to characterize the refraction jitter amplitude of each mesh vertex data after transformation when the vehicle model is under a simulated water level line, and the mesh vertex data at different distances have different refraction jitter amplitudes after the Fourier transform, and the distance is the distance between the mesh vertex data and the simulated water level line; The rendering module is used to render the vehicle model according to the underwater jitter data set to obtain a vehicle rendering model; The second determination module includes a first sub-determination module, a second sub-determination module, a combination module and a third processing module; The first sub-determination module is used to divide the vehicle model into a plurality of grids and add corresponding material information to each grid to obtain a vehicle grid model; The second sub-determination module is used to determine the target grid under the simulated water level line according to the vehicle grid model; The combining module is used to combine the mesh vertex data corresponding to the target mesh into a first data set, wherein the first data set is a set of mesh vertex data of the vehicle model below the simulation water level; The third processing module is used to process the first data set in real time through a precision matching algorithm and an ambient occlusion algorithm to obtain the target data set.

6. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the method described in any one of claims 1 to 4 are implemented.

7. An electronic device, characterized in that: include: a memory having a computer program stored thereon; A processor, configured to execute the computer program in the memory to implement the steps of the method according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Realistic modeling and drawing of shallow water wave

    CN101930622A

  • Dynamic map adjustment method and device

    CN109985384A

  • Method and system for simulating dynamic water body thumbnail model in real time

    CN111429558A

  • Water surface rendering in virtual environment

    US20180012392A1