Model rendering method and apparatus, electronic device, storage medium, and program product
By acquiring vehicle-mounted signal data to calculate the vertex offset of the 3D road model, and using polynomial functions to achieve dynamic deformation of the model, the problem of the 3D road model being disconnected from the vehicle's driving state is solved, improving the visual experience and safety of the in-vehicle HMI.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHONGQING CHANGAN AUTOMOBILE CO LTD
- Filing Date
- 2026-04-30
- Publication Date
- 2026-06-02
AI Technical Summary
Existing technologies make it difficult to achieve real-time linkage between 3D road models and vehicle driving status, resulting in the model being unable to adjust in real time to follow the vehicle's driving actions, failing to accurately reproduce visual changes in the road, and causing a disconnect between the model and the actual driving scenario.
By acquiring the vehicle's in-vehicle signal data, the positional offset of each vertex of the 3D road model is calculated, and a preset polynomial function is used for precise mapping. The vertex positions are updated in conjunction with the initial vertex coordinates, thereby realizing the linkage between the dynamic deformation of the model and the vehicle's driving state, ensuring the naturalness and realism of the model's deformation.
It achieves real-time linkage between 3D road models and vehicle driving status, ensuring that model deformation is aligned with the real driving scene, improving the realism and safety of the driving experience, and reducing the rendering performance loss of electronic devices.
Smart Images

Figure CN122134964A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of model rendering technology, specifically to model rendering methods, apparatus, electronic devices, storage media, and program products. Background Technology
[0002] With the rapid development of in-vehicle HMI (human-machine interface) technology, 3D road scene rendering has become one of the core technologies for improving driving experience and ensuring driving safety. Its core requirement is to present the target vehicle's driving road in a realistic and smooth 3D form on the vehicle's display screen, providing the driver with a clear reference for road shape, driving direction and surrounding environment, and assisting the driver in making accurate driving judgments.
[0003] Currently, the rendering methods for vehicle-mounted 3D road models mostly adopt preset fixed models or simple dynamic adaptation modes. That is, fixed 3D road models of different road types (straight roads, curves) are stored in advance, and the corresponding fixed model is switched according to the road type during vehicle driving, or the model is roughly adjusted by simply translating and rotating.
[0004] However, this existing technology makes it difficult to achieve real-time linkage between 3D road models and vehicle driving status. As a result, the 3D road model cannot adjust in real time to follow the vehicle's driving movements and always maintains a fixed shape. It cannot realistically reproduce the visual changes of the road during vehicle driving, resulting in a disconnect between the model and the actual driving scene. Summary of the Invention
[0005] This invention provides a model rendering method, apparatus, electronic device, storage medium, and program product to solve the problem of the disconnect between 3D road models and actual driving scenarios.
[0006] In a first aspect, the present invention provides a model rendering method, the method comprising: acquiring an initial 3D road model corresponding to the road on which the target vehicle is traveling; acquiring vehicle-mounted signal data corresponding to the target vehicle; acquiring initial vertex coordinates of each vertex in the initial 3D road model in world coordinates; calculating the position offset of each vertex in the initial 3D road model based on the vehicle-mounted signal data and the initial vertex coordinates; determining the target vertex coordinates of each vertex based on the position offset and the initial vertex coordinates; and obtaining the target 3D road model based on the target vertex coordinates.
[0007] The model rendering method provided in this application embodiment obtains an initial 3D road model corresponding to the road driven by the target vehicle. It provides lightweight 3D road base materials adapted to in-vehicle scenarios. This model is refined through artistic design, retaining only the core outline, eliminating the need for real-world / terrain modeling, significantly reducing rendering performance loss for electronic devices. Simultaneously, it provides a standardized 3D mesh base for subsequent dynamic deformation driven by vehicle-mounted signals, ensuring the feasibility of rendering processing. It obtains vehicle-mounted signal data corresponding to the target vehicle. This provides precise driving basis for the dynamic deformation of the 3D road model, enabling linkage between model deformation and the actual driving state of the vehicle. The standardized signal data can directly participate in subsequent graphics calculations, connecting vehicle-mounted engineering signals and 3D rendering logic, ensuring the real-time performance and accuracy of deformation. It obtains the initial vertex coordinates of each vertex of the initial 3D road model in world coordinates. It accurately extracts the standardized spatial coordinates of the model vertices, providing unified and accurate basic data for subsequent vertex position calculations, ensuring the consistency and accuracy of coordinate calculations. Simultaneously, the world coordinates conform to the actual driving space of the vehicle, aligning model deformation with the real driving scene space. Based on the vehicle-mounted signal data and the initial vertex coordinates, it calculates the position offset of each vertex. The vehicle's real-time driving signals are converted into spatial displacement values of vertices, achieving a precise mapping from "vehicle signal to vertex offset." Offsets are calculated differentially for each vertex, ensuring the model's deformation conforms to actual driving conditions such as road curvature and lane-changing angles, guaranteeing naturalness and realism. Target vertex coordinates are determined based on the position offset and initial vertex coordinates. Precise vertex position updates are achieved through coordinate overlay, performing offset calculations only on the lateral side of the road, preserving the original mesh topology of the model, avoiding tearing and distortion after deformation, and ensuring the integrity and rationality of the 3D road model's geometry. The target 3D road model is obtained based on the target vertex coordinates. The 3D road model is reconstructed using the updated vertex coordinates, transforming the initial model into a target model that dynamically deforms with the vehicle's signals. This allows the model to accurately match vehicle steering, lane-changing, and offset actions, restoring a realistic in-vehicle 3D road visual effect. Simultaneously, the reconstruction process preserves the model's original material and texture attributes, ensuring visual consistency.
[0008] In one optional implementation of the model rendering method provided in this application, the position offset is the X-axis offset; the method calculates the position offset of each vertex in the initial 3D road model based on vehicle signal data and initial vertex coordinates, including: calculating the target parameter value of a preset polynomial function corresponding to the position offset based on vehicle signal data; obtaining the initial z-axis coordinates of each vertex from the initial vertex coordinates; and calculating the X-axis offset of each vertex based on the target parameter value and the initial z-axis coordinates.
[0009] The model rendering method provided in this application calculates the target parameter values of a preset polynomial function based on vehicle-mounted vehicle signal data. It transforms real-time vehicle driving signals into polynomial parameters adapted to the deformation of the 3D road model, achieving a standardized mapping from engineering signals to graphics calculation parameters. This ensures that driving states such as steering, lane changing, and road curvature are accurately converted into the mathematical basis for model deformation, guaranteeing a high degree of matching between parameters and vehicle driving actions. This provides accurate and unified coefficient support for subsequent vertex offset calculations. The initial z-axis coordinates of each vertex are obtained from the initial vertex coordinates. The core dimension coordinates that determine the differences in model deformation are accurately extracted. The z-axis coordinates directly represent the distance between the vertex and the camera in the driving direction, providing a key variable for calculating differentiated offsets vertex by vertex. This ensures that the model can achieve natural bending / tilting effects with varying degrees of offset depending on distance, conforming to the visual shape of a real road. The X-axis offset of each vertex is calculated based on the target parameter values and the initial z-axis coordinates. Accurate calculation of vertex-by-vertex offset is achieved through polynomial functions. The model's nonlinearity and dynamic deformation that conforms to actual driving are realized by the differentiation of z-axis coordinates. Offset is calculated only on the X-axis to ensure that the model deformation conforms to the spatial logic of the vehicle road scene. At the same time, the unified calculation logic is adapted to GPU parallel computing, taking into account both calculation accuracy and the lightweight rendering requirements of electronic devices.
[0010] In one optional implementation, the preset polynomial function is a cubic polynomial function; based on the vehicle-mounted signal data, the target parameter value of the preset polynomial function corresponding to the position offset is calculated, including: Based on the vehicle-mounted signal data, the initial parameter values of the cubic polynomial function corresponding to the position offset are calculated; the initial parameter values include the initial constant term parameter value, the initial linear term parameter value, the initial quadratic term parameter value, and the initial cubic term parameter value. The initial parameter values are smoothed to obtain the target parameter values corresponding to the cubic polynomial function.
[0011] The model rendering method provided in this application transforms multi-source vehicle-to-everything (V2X) signals, such as steering wheel angle, vehicle speed, lane departure, and navigation curvature, into initial parameters of a cubic polynomial through kinematic models and geometric calculations. This achieves a precise mapping from real driving conditions to 3D road model deformation. The initial constant term (c0) and the first-order term (c1) respectively implement the overall lateral translation and lane departure tilt of the model, providing intuitive visual feedback for lane centering and navigation guidance. The initial quadratic term (c2) and the cubic term (c3), by fusing control intentions and forward-looking road information, correct the basic curvature and transition curves of the road model, ensuring that the model deformation conforms to the real road direction and vehicle trajectory. The initial parameter values are smoothed to obtain the target parameter values. Through exponential filtering, rate-of-change limitation, and dead-zone noise reduction, the model jitter and abrupt deformation caused by sensor noise and signal abrupt changes are effectively solved. Temporal domain smoothing ensures the continuity of parameter changes and avoids abrupt screen flickering. Spatial domain limitation prevents the model from "violently shaking," significantly improving visual stability, especially in high-speed scenarios. Dead zone processing eliminates minor bending artifacts in straight-line scenes, ensuring image purity and ultimately outputting stable and smooth target parameter values, thus guaranteeing the safety and comfort of in-vehicle human-machine interaction.
[0012] In one optional implementation, the vehicle-mounted signal data includes steering wheel angle, current vehicle speed, yaw rate, navigation path curvature, lane line recognition curvature, turn signal status, and lane offset. Based on the vehicle-mounted signal data, the initial parameter values of the cubic polynomial function corresponding to the position offset are calculated, including: determining the target offset corresponding to the target vehicle based on the turn signal status and the navigation command corresponding to the target vehicle; calculating the initial constant term parameter value of the cubic polynomial function based on the target offset; extracting the lane offset of the target vehicle relative to the road centerline from the vehicle-mounted signal data; calculating the initial linear term parameter value of the cubic polynomial function based on the lane offset; calculating the initial quadratic term parameter value of the cubic polynomial function based on the steering wheel angle, current vehicle speed, navigation path curvature, and lane line recognition curvature in the vehicle-mounted signal data; and calculating the initial cubic term parameter value of the cubic polynomial function based on the initial quadratic term parameter value.
[0013] The model rendering method provided in this application determines the target offset. By combining turn signal operation and navigation guidance commands, the target offset is dynamically set, achieving accurate visual prediction of lane change / guidance scenarios. This step provides a clear lateral translation target for constant term calculation, ensuring that the offset direction of the road model is completely consistent with the driver's lane change intention or navigation path guidance, improving the intuitiveness and operational compliance of visual guidance. Initial constant term parameter values are calculated. The target offset is mapped to a polynomial constant term, realizing the overall lateral translation of the 3D road model. This parameter serves as a unified lateral offset benchmark for all vertices, accurately achieving visual effects such as lane centering and navigation lane change guidance, ensuring that the overall model position conforms to real driving needs or guidance directions. Lane offset is extracted. The lateral position deviation of the vehicle relative to the lane centerline is accurately extracted, providing a real physical input basis for linear term calculation. This parameter quantifies the real-time offset state of the vehicle within the lane and is the basic data source for achieving visual effects such as lane keeping correction and lane departure warning. Initial linear term parameter values are calculated. The lane offset is converted into a linear term parameter, realizing the lateral tilt / shear deformation of the road model. This parameter causes the road model to tilt according to the degree of vehicle deviation, simulating the driver's visual expectation of straightening the direction. This solves the visual abruptness of traditional models that only translate without dynamic tilting, enhancing the realism of the driving experience. Initial quadratic parameter values are calculated. By integrating steering wheel angle, vehicle speed, navigation, and lane curvature, basic bending parameters are calculated, achieving precise bending deformation of the road model. This coefficient is a core element in simulating real road turns and conforming to the vehicle's trajectory, ensuring that the model's bending shape both matches the driver's steering intention and the actual road direction ahead, significantly improving the realism and rationality of the road model's deformation. Initial cubic parameter values are calculated. Based on the quadratic parameter, cubic terms are calculated to achieve smooth curve correction at curve entrances / exits. This parameter performs nonlinear fine-tuning of the basic bending, solving the "harsh angle" problem at curvature changes in pure quadratic curves, making the road model's bending transitions smoother and more natural, conforming to the geometry of real roads and the driver's visual perception habits.
[0014] In one optional implementation, the initial quadratic term parameter value corresponding to the cubic polynomial function is calculated based on the steering wheel angle, current vehicle speed, navigation path curvature, and lane line recognition curvature in the vehicle signal data. This includes: calculating the control term coefficient based on the steering wheel angle and current vehicle speed; calculating the look-ahead term coefficient based on the navigation path curvature and lane line recognition curvature; and fusing the control term coefficient and the look-ahead term coefficient to obtain the initial quadratic term parameter value.
[0015] The model rendering method provided in this application calculates the control term coefficients based on the steering wheel angle and current vehicle speed. It transforms the driver's real-time steering input into road curvature parameters, accurately reflecting the driver's intentions. Simultaneously, it introduces vehicle speed for dynamic correction, making the steering response smoother at high speeds and more sensitive at low speeds, improving the rationality of model deformation and driving safety at different speeds. It calculates the look-ahead term coefficients based on the curvature of the navigation path and the curvature of the lane lines. It integrates dual-source road information from navigation and camera perception to obtain realistic and stable curvature data of the road ahead; it prioritizes using real-time camera curvature to ensure accuracy, and uses navigation curvature as a fallback when no effective visual data is available, significantly improving the robustness and scene adaptability of the road model. The control term coefficients and look-ahead term coefficients are fused to obtain initial quadratic term parameter values. The driver's input and the actual road direction are dynamically weighted and combined, allowing the road model to both follow the input and conform to the actual road; dynamic weighting adapts to different scenarios such as low speed and high speed, making the quadratic term parameters more stable and natural, effectively avoiding model jitter and abrupt changes, and ensuring smooth and reliable rendering.
[0016] In one optional implementation, after obtaining the target 3D road model based on the target vertex coordinates, the method further includes: obtaining a preset visible display length of the target 3D road model on the target display screen; determining the target segment model displayed on the target display screen based on the preset visible display length; determining a preset number of target segment vertices from the target segment model based on preset rules; and rendering the transparency of the target segment model based on each target segment vertex to obtain the final displayed 3D road model.
[0017] The model rendering method provided in this application obtains a preset visible display length of the target 3D road model on the target display screen. It defines a precise length threshold for the target 3D road model's screen display, adapting to the target display screen's display size, pixel range, and in-vehicle visual design specifications. This avoids visual redundancy or missing road information caused by excessively long or short model displays, and provides a quantitative basis for subsequent selection of model segments within the screen's visible range. The method determines target segment models based on the preset visible display length. Road model segments within the screen's visible range are selected, and redundant model portions exceeding the display length are removed, reducing meaningless rendering calculations, significantly lowering the GPU computing power consumption of the vehicle's infotainment system, adapting to the lightweight rendering requirements of in-vehicle systems, and ensuring that the final displayed 3D road model accurately matches the screen's field of view. A preset number of target segment vertices are determined from the target segment models based on preset rules. The extracted feature vertices serve as precise segmentation nodes for the target segment model's transparency segmentation, providing a basis for subsequent segmented transparency rendering of the target segment model. This replaces the high-computational-power per-vertex rendering method, further optimizing rendering efficiency, while ensuring that the transparency segmentation conforms to the "fade-show-full-fade" in-vehicle visual perception pattern. The transparency of the target segment model is rendered based on the vertices of each target segment to obtain the final 3D road model. Segmented transparency rendering of the final 3D road model is achieved through vertex segmentation, resulting in a natural visual effect where the near segment gradually becomes visible, the middle segment is fully visible, and the far segment gradually fades away. This solves the visual abruptness problem caused by hard clipping in traditional models and achieves smooth integration between the model and the background. Finally, a full-effect rendering combining dynamic deformation, screen adaptation, and fading effects is completed, enhancing the visual naturalness of the in-vehicle 3D road scene and the driving experience.
[0018] In one optional implementation, the transparency of the target segment model is rendered based on the vertices of each target segment to obtain the final displayed 3D road model, including: splitting the target segment model into multiple sub-segment models based on the vertices of each target segment; determining the transparency of each sub-segment model according to its corresponding position; and rendering the transparency of the target segment model based on the transparency of each sub-segment model to obtain the final displayed 3D road model.
[0019] The model rendering method provided in this application splits the target segment model into multiple sub-segment models based on the vertices of the target segment. Feature vertices are used as precise segmentation nodes to segment the target segment model, allowing each sub-segment to correspond to an independent transparency rendering stage, laying the foundation for segmented transparency rendering of "full transparency - gradual appearance - full appearance - gradual disappearance". After splitting, the original mesh and visual attributes of the model are preserved, ensuring continuous connection between sub-segments without tearing or discontinuity issues. The corresponding transparency is determined according to the position of the sub-segment model. Adaptive transparency (fixed value / linear variation range) is matched to sub-segments at different positions according to the driving direction, making the transparency distribution conform to the human eye's visual perception rules in vehicles, achieving a natural transition between near and far sections of the final displayed 3D road model, avoiding visual abruptness caused by single transparency, and ensuring the rationality of the gradual appearance / disappearance effect. The final displayed 3D road model is obtained based on the transparency rendering of the sub-segments. Precise rendering of transparency is completed segment by segment and merged into the overall final displayed 3D road model, achieving a natural gradual appearance / disappearance visual effect of the final displayed 3D road model, allowing the final displayed 3D road model to smoothly blend with the screen background, simulating a realistic fog-like scene. The entire process is based on segmented rendering, which consumes low computing power and is adapted to the lightweight requirements of electronic devices. The final result is a 3D road model that combines dynamic deformation and natural visual transition, which greatly improves the visual experience of in-vehicle HMI.
[0020] In one optional implementation, the transparency of each sub-segment model is determined according to its position, including: arranging each sub-segment model according to the direction of travel of the target vehicle based on its position; and determining the transparency of each sub-segment model according to its arrangement order, thereby achieving a rendering effect where the target segment model transitions from fully transparent to gradually visible, from gradually visible to fully visible, and then from fully visible to gradually invisible and back to fully transparent.
[0021] The model rendering method provided in this application arranges the models of each sub-segment according to the vehicle's driving direction based on their positions. It unifies the spatial sorting logic of the sub-segment models, ensuring that the sorting result matches the driver's actual visual observation order, providing a clear and orderly basis for subsequent sequential transparency calibration. Simultaneously, by using position-related sorting, it avoids transparency rendering logic errors caused by disordered sub-segment order, ensuring that the visual stages of gradual appearance and fading match the actual field of vision. The transparency of each sub-segment model is determined according to the arrangement order. The visual effect of "fully transparent → gradually appearing → fully visible → fading → fully transparent" is precisely matched according to the driving direction, allowing sub-segments at different positions to correspond to reasonable transparency parameters. This achieves a final 3D road model display where the near section naturally blends into the background, the middle section is clearly displayed, and the far section is softly blurred, solving the visual abruptness problem of hard cropping in traditional 3D road models and improving the realism and driving visual comfort of in-vehicle 3D road scenes.
[0022] Secondly, the present invention provides a model rendering apparatus, the apparatus comprising: The first acquisition module is used to acquire the initial 3D road model corresponding to the road where the target vehicle is traveling. The second acquisition module is used to acquire the vehicle-mounted signal data corresponding to the target vehicle. The first rendering module is used to obtain the initial vertex coordinates of each vertex in the initial 3D road model in world coordinates; calculate the position offset of each vertex in the initial 3D road model based on the vehicle signal data and the initial vertex coordinates; determine the target vertex coordinates of each vertex based on the position offset and the initial vertex coordinates; and obtain the target 3D road model based on the target vertex coordinates.
[0023] Thirdly, the present invention provides an electronic device, comprising: a memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the computer instructions to perform the model rendering method of the first aspect or any corresponding embodiment described above.
[0024] Fourthly, the present invention provides a computer-readable storage medium storing computer instructions for causing a computer to execute the model rendering method of the first aspect or any corresponding embodiment thereof.
[0025] Fifthly, the present invention provides a computer program product, including computer instructions for causing a computer to execute the model rendering method of the first aspect or any corresponding embodiment thereof. Attached Figure Description
[0026] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0027] Figure 1 This is a schematic diagram of the first process of a model rendering method according to an embodiment of the present invention; Figure 2 This is a schematic diagram of a second process for a model rendering method according to an embodiment of the present invention; Figure 3 This is a schematic diagram of a target 3D road model according to an embodiment of the present invention; Figure 4 This is a schematic diagram illustrating the rendering effect of the target paragraph model according to an embodiment of the present invention; Figure 5 This is a structural block diagram of a first model rendering apparatus according to an embodiment of the present invention; Figure 6 This is a structural block diagram of a second model rendering apparatus according to an embodiment of the present invention; Figure 7 This is a schematic diagram of the hardware structure of an electronic device according to an embodiment of the present invention. Detailed Implementation
[0028] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0029] It is understood that before using the technical solutions disclosed in the various embodiments of the present invention, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in the present invention and their authorization should be obtained in accordance with relevant laws and regulations through appropriate means.
[0030] The terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this invention, "a plurality of" means two or more, unless otherwise explicitly specified.
[0031] According to an embodiment of the present invention, a model rendering method embodiment is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0032] This embodiment provides a model rendering method that can be used in electronic devices. The electronic device can be a vehicle-mounted terminal in the target vehicle, or a server or electronic device corresponding to a navigation system that is connected to the target vehicle. This application embodiment does not specifically limit the electronic device. Figure 1 This is a flowchart of a model rendering method according to an embodiment of the present invention, such as... Figure 1 As shown, the process includes the following steps: Step S101: Obtain the initial 3D road model corresponding to the road where the target vehicle is traveling.
[0033] Specifically, electronic devices can obtain the type of road the target vehicle is currently traveling on (such as urban asphalt roads, highways, rural roads, etc.) through navigation systems, high-precision maps, lane recognition modules, etc., and obtain the basic attributes of the road (such as single lane / double lane, presence or absence of guardrails / curb, lane width, etc.).
[0034] The electronic device can accurately match the initial 3D road model corresponding to the road being traveled by the target vehicle from a pre-stored lightweight 3D road model library based on the identified current road type.
[0035] Among them, the pre-stored lightweight 3D road model library stores preset 3D road models classified by road type and scene, which can retain the core outline, simplify the number of vertices, and adapt to the lightweight requirements of electronic devices.
[0036] The initial 3D road model is a standardized three-dimensional mesh model, which includes the vertex coordinates, surface mesh, material textures and other basic 3D attributes of the core road components such as driving lines, guardrails, curbs and road surfaces.
[0037] The electronic device can load the initial 3D road model into the memory of the corresponding 3D rendering engine of the electronic device, complete the coordinate initialization of the initial 3D road model, establish a world space coordinate system with the current position of the target vehicle as the origin, and align the initial coordinates of the model with the vehicle's driving direction, waiting for subsequent rendering processing.
[0038] Step S102: Obtain the vehicle-mounted signal data corresponding to the target vehicle.
[0039] Specifically, electronic devices can acquire vehicle-mounted signal data corresponding to the target vehicle based on the signal acquisition module and signal preprocessing unit in the target vehicle.
[0040] The signal acquisition module can synchronously acquire the aforementioned signals from various sensor / functional modules according to the frame rate of the target vehicle's 3D rendering (e.g., 60 frames / second), ensuring signal temporal consistency and preventing asynchrony between model deformation and vehicle movement. Signal preprocessing performs noise filtering, outlier removal, and unit standardization on the acquired raw signals. It removes signal abrupt changes caused by minor steering wheel vibrations and lane recognition errors to prevent "jitter-like deformation" in the model. It filters extreme signal values caused by sensor malfunctions to ensure signal validity. All initial signals are converted to standard units for rendering calculations (e.g., angles to radians (rad), distances to meters (m)). Finally, the preprocessed vehicle system signals are integrated into structured vehicle system signal data and transmitted to the signal parsing unit of the vehicle system 3D rendering engine according to a preset format, awaiting subsequent parameter conversion.
[0041] The vehicle-mounted vehicle signal data can include core deformation signals and auxiliary scene signals. The core deformation signals can include: steering wheel angle signal (reflecting the vehicle's steering intention); road curvature signal (curvature value / radius of curvature of the current driving path output by the map / high-precision map); lane departure / lane merging signal (including lane merging angle θ and lane departure amount D); and vehicle position relative to the road centerline.
[0042] Auxiliary scene signals may include: vehicle speed signal: used to determine the driving scene (urban road / highway / low-speed road); headlight / wiper signal: used to determine the night / rainy scene and fine-tune the fade-in / fade-out parameters; vehicle attitude signal: used to match the camera coordinates from the driver's perspective to ensure accurate distance calculation for fade-in / fade-out.
[0043] Step S103: Based on the vehicle signal data, render the position of each vertex in the initial 3D road model to obtain the target 3D road model.
[0044] Specifically, electronic devices can render the position of each vertex in the initial 3D road model based on vehicle signal data to obtain the target 3D road model.
[0045] This step will be explained in detail below.
[0046] The model rendering method provided in this application embodiment obtains an initial 3D road model corresponding to the road driven by the target vehicle. It provides lightweight 3D road base materials adapted to in-vehicle scenarios. This model is refined through artistic design, retaining only the core outline, and does not rely on real-world / terrain modeling, significantly reducing the performance loss of electronic device rendering. Simultaneously, it provides a standardized 3D mesh base for subsequent dynamic deformation driven by vehicle-mounted signals, ensuring the feasibility of rendering processing. It obtains the vehicle-mounted signal data corresponding to the target vehicle. This provides a precise driving basis for the dynamic deformation of the 3D road model, realizing the linkage between model deformation and the actual driving state of the vehicle. The standardized signal data can directly participate in subsequent graphics calculations, connecting vehicle-mounted engineering signals and 3D rendering logic, ensuring the real-time performance and accuracy of deformation. Based on the vehicle-mounted signal data, the positions of each vertex in the initial 3D road model are rendered to obtain the target 3D road model. The vehicle's infotainment system signals are converted into position offsets of the vertices of a 3D road model, enabling real-time dynamic deformation of the model as the vehicle turns, changes lanes, and performs other actions, making the 3D road scene in the vehicle closely resemble the real driving vision. Through precise vertex-by-vertex rendering, the model deformation is ensured to be smooth and natural, without jagged edges or breaks, thus improving the visual experience of the in-vehicle HMI. At the same time, lightweight calculations are performed in the vertex rendering stage to adapt to the computing power of electronic device hardware, balancing deformation effects and rendering smoothness.
[0047] This embodiment provides a model rendering method that can be used in an electronic device. The electronic device can be a control terminal in the target vehicle, or a server or electronic device corresponding to a navigation system that is connected to the target vehicle. This embodiment does not specifically limit the electronic device. Figure 2 This is a flowchart of a model rendering method according to an embodiment of the present invention, such as... Figure 2 As shown, the process includes the following steps: Step S201: Obtain the initial 3D road model corresponding to the road where the target vehicle is traveling.
[0048] Please refer to the above description of step S101 for details on this step, which will not be repeated here.
[0049] Step S202: Obtain the vehicle-mounted signal data corresponding to the target vehicle.
[0050] Please refer to the above description of step S102 for details on this step, which will not be repeated here.
[0051] Step S203: Based on the vehicle signal data, render the position of each vertex in the initial 3D road model to obtain the target 3D road model.
[0052] Specifically, step S203 above may include the following steps: Step S2031: Obtain the initial vertex coordinates of each vertex in the initial 3D road model in world coordinates.
[0053] Specifically, the electronic device can extract the local coordinates of all vertices in model space (coordinates with the center of the model as the origin, which are the original coordinates during modeling) from the 3D mesh data of the initial 3D road model. Then, through the world transformation matrix of the electronic device's 3D rendering engine, the local coordinates in model space are converted into world space coordinates, with the current position of the target vehicle as the origin, fitting the actual driving space coordinate system of the target vehicle. The conversion process takes into account the vehicle's current driving position and heading, ensuring that the vertex coordinates are aligned with the actual driving scene space.
[0054] Then, the electronic device stores the initial vertex coordinates of all vertices in world coordinates in a structured manner according to the model mesh index, forming a dataset with one-to-one correspondence between vertex and coordinate, which facilitates subsequent vertex-by-vertex offset calculation and avoids coordinate confusion.
[0055] Optionally, the electronic device can also filter out invalid vertex coordinates in the initial 3D road model (such as redundant vertices during modeling, or vertices whose coordinate values exceed the accuracy range of the vehicle's rendering engine) to ensure the accuracy of subsequent calculations.
[0056] Step S2032: Based on the vehicle-mounted signal data and the initial vertex coordinates, calculate the position offset of each vertex in the initial 3D road model.
[0057] Specifically, step S2032 above may include the following steps: Step a1: Based on the vehicle-mounted signal data, calculate the target parameter value of the preset polynomial function corresponding to the position offset.
[0058] Specifically, the presupposes that the polynomial function is a cubic polynomial function; step a1 above may include the following steps: Step a11: Based on the vehicle-mounted signal data, calculate the initial parameter values of the cubic polynomial function corresponding to the position offset.
[0059] The initial parameter values include the initial constant term parameter values, the initial linear term parameter values, the initial quadratic term parameter values, and the initial cubic term parameter values.
[0060] In one optional implementation, the vehicle infotainment system signal data includes steering wheel angle, current vehicle speed, yaw rate, navigation path curvature, lane line recognition curvature, turn signal status, and lane departure. For example, Table 1 illustrates the vehicle infotainment system signal data. All of this signal data consists of standard signals from the target vehicle's CAN bus.
[0061] Table 1. Schematic diagram of vehicle-mounted system signal data
[0062] Specifically, step a11 above may include the following steps: Step a111: Based on the turn signal status and the navigation command corresponding to the target vehicle, determine the target offset corresponding to the target vehicle.
[0063] Specifically, electronic devices can synchronously obtain the turn signal status (left turn / right turn / off) and real-time navigation instructions (such as "keep lane", "change lane to the right", "keep left to enter ramp") from the vehicle's signal data.
[0064] Then, the electronic device determines the target offset corresponding to the target vehicle based on the turn signal status and the navigation instructions corresponding to the target vehicle.
[0065] For example, the current navigation command is to go straight, the driving mode is lane centering mode, and the target offset is set to... The road model remains aligned with the lane centerline without any overall offset. When the navigation command guides the driver to change lanes to the target lane in advance (e.g., "Drive to the right" or "Enter the ramp on the left"), set specific values according to the navigation command. For example, when changing lanes to the right, the target offset is set to... When changing lanes to the left, the target offset is set to .
[0066] When the driver activates the turn signal, the road model is pre-offset to enhance visual guidance for lane changes. When the left turn signal illuminates, the target offset is... The target offset transitions linearly from 0 to a negative value (e.g., -0.3m); when the right turn signal is on, the target offset... The value transitions linearly from 0 to a positive value (e.g., 0.3m). Logic: Gradual value selection avoids sudden shifts in the model and improves visual comfort.
[0067] Step a112: Based on the target offset, calculate the initial constant term parameter values corresponding to the cubic polynomial function.
[0068] Specifically, electronic devices can achieve consistency between visual guidance and actual operation through reverse mapping. Therefore, the initial constant term parameter value corresponding to the cubic polynomial function is calculated as follows: When navigation requires a rightward shift, c0 raw When the value is less than 0, the road model shifts to the right to guide the driver in changing lanes.
[0069] Optionally, the electronic device can use the clamp function to set c0 raw The range is limited to [-1,1] to prevent excessive model shift due to signal anomalies and ensure visual safety.
[0070] Step a113: Extract the lane offset of the target vehicle relative to the road centerline from the vehicle signal data.
[0071] Specifically, electronic devices can accurately extract the real-time lane offset of the vehicle relative to the road centerline from vehicle signal data. offset This parameter characterizes the vehicle's current lateral position deviation within the lane and is the parameter c1 used in the first-order calculation. raw The original input.
[0072] The lane departure measurement is collected by the vehicle's vision module (camera recognizing lane lines) or a high-precision positioning module, and is measured in meters (m). When a vehicle deviates to the right from the road's centerline, lat offset The value is positive when it deviates to the left; it is negative when it is centered; and it is 0 when it is centered. Electronic devices can perform moving average filtering (such as 5-frame moving average) on the raw acquired data to eliminate offset jitter caused by sensor noise.
[0073] Step a114: Based on the lane offset, calculate the initial linear term parameter values corresponding to the cubic polynomial function.
[0074] Specifically, electronic devices can map physical offsets to graphical tilt parameters using a sensitivity coefficient, as shown in the formula: c1raw =λ·lat offset Where λ is the sensitivity coefficient, ranging from 0.05 to 0.2, and can be calibrated according to vehicle model and visual style, c1 raw c1 represents the initial parameter value for the first-order term. raw The amplitude is controlled within a small range to ensure a gentle tilt of the model and avoid causing dizziness to the driver. For example, lat offset When c1 = 0.3m and λ = 0.1, raw =0.03, the 3D road model is only slightly tilted. c1 raw It is linearly related to the z-axis coordinate of the vertex (distance in the driving direction), so as to achieve a natural visual effect of "different distances and different degrees of inclination" in the road model.
[0075] Step a115: Based on the steering wheel angle, current vehicle speed, navigation path curvature, and lane line recognition curvature in the vehicle signal data, calculate the initial quadratic term parameter value corresponding to the cubic polynomial function.
[0076] Specifically, step a115 above may include the following steps: Step a1151: Calculate the control coefficient based on the steering wheel angle and the current vehicle speed.
[0077] Specifically, the electronic device can convert the steering wheel angle δ into the actual front wheel steering angle φ based on the steering ratio (12~20) of the target vehicle, using the following formula: .
[0078] Then, the electronic device, based on the Ackermann steering geometry model and in conjunction with the vehicle wheelbase L, calculates the expected turning radius R and the expected curvature κ. expected The formula is: ;κ expected =1 / R.
[0079] Electronic devices can incorporate a vehicle speed coefficient β to simulate the safety logic of smooth steering at high speeds: β=clamp(v / v ref (0, 1), where v is the current vehicle speed, v ref For a reference vehicle speed (e.g., 60 km / h), the clamp function limits the range of β to [0, 1].
[0080] Electronic devices based on vehicle speed coefficient β and expected curvature κ expected Calculate the control term coefficient c2driver using the formula: c2 driver =κ expected ·β.
[0081] Step a1152: Calculate the look-ahead coefficient based on the curvature of the navigation path and the curvature of the lane line recognition.
[0082] Specifically, electronic devices can prioritize using the lane line recognition curvature κ_cam (reflecting the current real lane shape) collected by the camera; when the camera data is invalid (such as at night or when strong light obstructs the view), they can switch to the path curvature κ_nav (reflecting the forward bend) provided by the navigation system.
[0083] The electronic device can calculate the average curvature within a preset range for the selected curvature signal, eliminating model jitter caused by single-point noise.
[0084] For example, suppose the electronic device can calculate the average curvature over a 50m range for a selected curvature signal, using the following formula: , where s is the virtual arc length along the road direction, and κ(s) is the lane line recognition curvature κ_cam or the path curvature κ_nav.
[0085] Then, the electronic device will be based on the mean curvature The coefficient for the forward-looking term is determined by the following formula: .
[0086] Step a1153: The coefficients of the control term and the coefficients of the look-ahead term are fused to obtain the initial quadratic term parameter values.
[0087] Specifically, the electronic device can adjust the weights α corresponding to the control and look-ahead coefficients based on the current vehicle speed and curve type. For example, in low-speed scenarios (such as parking): α is set to 0.2, prioritizing the matching of control items to meet the needs of large-angle turns; in high-speed scenarios (such as cruise control): α is set to 0.8, prioritizing the matching of look-ahead items to ensure that the road model closely matches the actual road conditions.
[0088] Then, based on the weights α corresponding to the control term coefficients and the prospective term coefficients, the control term coefficients and prospective term coefficients are fused to obtain the initial quadratic term parameter values.
[0089] The formula is: .
[0090] Step a116: Based on the initial quadratic term parameter values, calculate the initial cubic term parameter values corresponding to the cubic polynomial function.
[0091] Specifically, the electronic device can initialize the initial quadratic term parameter value c2 of consecutive frames. raw Performing a first-order difference operation yields the rate of change of curvature, which characterizes the trend of curvature change with road length. The formula is: ,in, The initial quadratic term parameter value c2 corresponding to the current frame. raw The value, c2(t-1), is the initial quadratic term parameter value c2 corresponding to the previous frame. rawThe value is given by Δt, where Δt is the frame interval time and v·Δt is the distance traveled by the vehicle between two adjacent frames.
[0092] Next, the electronic device can introduce a configurable scaling factor k (with a value of...). (10%~30% of the amplitude), convert the rate of change of curvature into the initial cubic term parameter value: During the cornering phase: dκ / ds > 0. When positive, the curvature of the road model gradually increases along the z-axis, achieving a smooth transition when entering the curve; when exiting the curve: dκ / ds < 0. If the value is negative, the curvature of the road model gradually decreases along the z-axis, achieving a smooth return to positive after exiting a curve.
[0093] Step a12: Smooth the initial parameter values to obtain the target parameter values corresponding to the cubic polynomial function.
[0094] Specifically, since the original coefficient c0 calculated above is used directly... raw c1 raw c2 raw c3 raw This can cause sudden changes and jitters in 3D models, severely affecting the visual experience.
[0095] Therefore, electronic devices can access C0. raw c1 raw c2 raw c3 raw Four coefficients are independently subjected to exponential smoothing filtering, balancing parameter response speed and visual smoothness. The core formula is: .
[0096] Specifically, the smoothing factor γ determines the weight ratio between the current original coefficients and the historical smoothing coefficients. A larger γ results in a faster parameter response; a smaller γ results in smoother parameters. The specific value is adjusted according to the driving scenario. For example, in a turning scenario: γ = 0.4, improving response speed and ensuring the model follows the steering action promptly, avoiding visual delay; in a straight-line scenario: γ = 0.1, prioritizing stability and filtering parameter fluctuations caused by minor sensor noise. The original coefficient values for the current frame, including c0. raw c1 raw c2 raw c3 raw ; These are the smoothed coefficient values for the current frame. The smoothed coefficient values include c0. temp c1 temp c2 temp c3 temp ; These are the smoothed coefficient values from the previous frame. The smoothed coefficient values include c0. tempc1 temp c2 temp c3 temp .
[0097] During scene switching transition, electronic devices can use linear interpolation to achieve a smooth switching of γ between 0.1 and 0.4, avoiding abrupt changes in the smoothing strategy.
[0098] Electronic devices can convert C0 raw c1 raw c2 raw c3 raw Substitute the above into The calculation yields the intermediate coefficient set {c0} after time-domain smoothing. temp c1 temp c2 temp c3 temp This eliminates inter-frame abrupt changes in the original coefficients, such as when the steering wheel angle fluctuates slightly, c2 temp It will not fluctuate drastically, ensuring a smooth transition in the curvature of the road model. For example, electronic devices can... raw Substitution ,get Similarly, we obtain ; ; .
[0099] Electronic devices can set a time change rate threshold for smoothed intermediate coefficients to limit the rate of parameter change and avoid the visual defect of "sudden shaking" in 3D road models. The core constraint rule is: .
[0100] Specifically, electronic devices can prioritize the core coefficient c2 that controls road curvature. temp Apply a rate-of-change constraint and calculate the coefficient change between two adjacent frames: ,like Then force c2 temp (t) is modified to Ensure that the rate of change does not exceed the limit.
[0101] In high-speed scenarios, when the vehicle speed exceeds a preset speed threshold (e.g., v>80km / h), c2 is further compressed. temp and c3 temp The rate of change threshold (e.g., adjusted to 0.02 / second) is because drivers are more sensitive to visual tremors at high speeds, requiring higher parameter stability. For c0 temp c1 tempBy using the same logic to set the rate of change threshold (e.g., 0.1 / second), the overall translation and tilting speeds of the model are matched with the bending effect, avoiding local parameter disconnects. This prevents abrupt changes in the model's bending degree under extreme conditions (such as a steering wheel returning to center quickly), ensuring visual safety in high-speed scenes.
[0102] To address the parameter drift issue caused by minute sensor noise during straight-line driving, a curvature dead zone threshold is set to forcibly suppress invalid parameter fluctuations. The core rule is: when the original curvature... At that time, force C2 temp =0、c3 temp =0, where κ is the lane line recognition curvature κ_cam or the path curvature κ_nav.
[0103] Specifically, the original curvature κ comes from lane line recognition or navigation path data, when At this point, the current road is determined to be straight, with no valid need for curvature. In a straight-road scenario, the curve control c2 is forcibly moved. temp and c3 temp Zeroing the value eliminates the "straight road with slight bends" phenomenon caused by sensor noise, ensuring that the road model is straight and stable.
[0104] When the curvature enters the dead zone from outside the dead zone, a linear gradient method is used to change c2. temp c3 temp The transition from the current value to 0 avoids model "rebound jitter" caused by parameters suddenly returning to zero. It also addresses the issue of minor, irregular bending of the model due to sensor noise when driving on straight roads, improving image clarity.
[0105] Finally, the electronic device integrates the coefficients after time-domain smoothing, spatial-domain constraint, and dead-zone noise reduction to obtain the final target parameter set: {c0} smoothed c1 smoothed c2 smoothed c3 smoothed The electronic device directly substitutes this final target parameter set into the cubic polynomial offset formula. z represents the Z-axis coordinate of each vertex. The X-axis offset of each vertex is calculated based on the Z-axis coordinate of each vertex, driving the 3D road model to achieve smooth and stable dynamic deformation.
[0106] Step a2: Obtain the initial z-axis coordinates of each vertex from the initial vertex coordinates.
[0107] Specifically, the electronic device can traverse each vertex of the initial 3D road model and extract the initial z-axis coordinate z0 from the three-dimensional coordinates (x0, y0, z0) of that vertex. Then, the electronic device stores z0 in a temporary variable for use in the next offset calculation. The above operation is performed on all vertices of the initial 3D road model to ensure a one-to-one correspondence between each vertex.
[0108] Step a3: Based on the target parameter values and the initial z-axis coordinates, calculate the X-axis offset corresponding to each vertex.
[0109] Specifically, the electronic device can pass the four target parameter values calculated in steps a11-a18 to the shader: c0, c1, c2, c3. Then, the electronic device loads the initial Z-axis coordinate z0 of the current vertex. Substituting the initial Z-axis coordinate z0 into the cubic polynomial formula, the X-axis offset is calculated as follows: .
[0110] Then, the electronic device can apply a reasonable constraint to the calculated X-axis offset Δx, using the following formula: This avoids excessive offset that could distort the target 3D road model.
[0111] Step S2033: Based on the position offset and the initial vertex coordinates, determine the target vertex coordinates corresponding to each vertex.
[0112] Specifically, a one-to-one coordinate update calculation is performed for each vertex to obtain the target vertex coordinates corresponding to each vertex. The core formula is:
[0113] Where x1 is the x-axis coordinate of the target vertex, y1 and z1 are the same as the initial vertex coordinates, and only the x-axis coordinates are updated to achieve the lateral deformation of the model, and Δx is the offset in the X-axis direction.
[0114] Then, the electronic device stores the target vertex coordinates and the original initial vertex coordinates one-to-one according to the vertex mesh index, ensuring that the mesh topology of the 3D road model remains unchanged (only the vertex positions change, the mesh connection relationship remains unchanged), and avoiding tearing after the model is deformed. Finally, the electronic device normalizes the value of the target vertex coordinates to the coordinate calculation accuracy range of the electronic device's 3D rendering engine (such as [-50, 50]), avoiding rendering calculation errors caused by excessively large coordinate values and ensuring the clarity of the model display.
[0115] Step S2034: Based on the target vertex coordinates, obtain the target 3D road model.
[0116] Specifically, the electronic device can reassign the target vertex coordinates to the three-dimensional mesh of the initial 3D road model according to the mesh topology, only updating the vertex position, while preserving the mesh connection relationship, material texture, and lighting parameters of the model, ensuring that the texture fits perfectly and there is no visual tearing after the model is deformed.
[0117] Then, based on the updated target vertex coordinates, the electronic device reconstructs the overall geometry of the 3D road model, generating a dynamically deformed mesh model. At this point, the model perfectly matches the driving state corresponding to the vehicle's signals (such as turning, merging, and offset). Finally, the reconstructed 3D road model undergoes rendering preprocessing such as primitive assembly and vertex normalization, converting the model data into a format recognizable by the fragment shader to obtain the target 3D road model, preparing it for subsequent fading-in / fading-out transparency calculations. Furthermore, the electronic device can also check for geometric distortions in the reconstructed target 3D road model (such as vertex overlap or mesh face flipping), automatically correcting them if present to ensure the model's visual integrity and natural display. For example, such as... Figure 3 As shown, this is a schematic diagram of the target 3D road model.
[0118] Step S204: Obtain the preset visible display length of the target 3D road model on the target display screen.
[0119] Specifically, the electronic device can automatically read the core parameters of the target display screen (such as resolution 1920×720, pixel density 300PPI, physical size 10 inches) to determine the effective display pixel range along the driving direction. Then, based on the current driving scenario (city / highway / nighttime), the electronic device can match the corresponding road model visual display rules from the in-vehicle HMI visual design specifications (such as a preset visible length of 800px for city roads, 1000px for highways, and 600px for nighttime driving). Based on the screen attributes and preset rules, the electronic device can calibrate the preset visible display length L of the target 3D road model on the screen, convert it into pixel units recognizable by the in-vehicle 3D rendering engine, and store it as a core reference parameter for subsequent steps.
[0120] Electronic devices can verify whether the calibrated length matches the maximum display pixels of the screen along the driving direction (e.g., if the maximum pixels of the screen along the driving direction are 900px, then the preset length will not exceed 900px) to avoid exceeding the screen display range.
[0121] Step S205: Based on the preset visible display length, determine the target segment model of the target 3D road model to be displayed on the target display screen.
[0122] Specifically, the electronic device can use the viewport projection matrix of its 3D rendering engine to convert the world coordinates of all vertices of the target 3D road model into 2D pixel coordinates on the target display screen, establishing a one-to-one correspondence between "3D road model vertices" and "2D screen pixels." Then, based on the converted 2D pixel coordinates, the total display pixel length of the target 3D road model on the screen along the driving direction is calculated. Next, the electronic device can extract a model segment of length L along the driving direction based on the display position of the target vehicle on the target display screen; this segment is the target segment model M.
[0123] For example, the electronic device can take the display position of the target vehicle on the target display screen as the starting point and extract a segment model M with a pixel length L along the driving direction. The electronic device can also take the display position of the target vehicle on the target display screen as the 1 / 5 dividing point, extract a pixel length of 1 / 5L along the driving direction and a pixel length of 4 / 5L along the driving direction to obtain a segment model M with a pixel length L.
[0124] Electronic devices can perform vertex smoothing on the beginning and end boundaries of the selected target paragraph model to avoid jagged or broken model boundaries caused by truncation, thus ensuring the visual continuity of the model.
[0125] Step S206: Based on preset rules, determine a preset number of target paragraph vertices from the target paragraph model.
[0126] Specifically, the electronic device can arrange all vertices of the target segment model M in ascending order according to the Z-axis world coordinates along the vehicle's driving direction (the smaller the Z-axis value, the closer it is to the vehicle / camera; the larger the Z-axis value, the farther it is from the vehicle / camera), forming an ordered vertex set.
[0127] Electronic devices can determine a preset number of target paragraph vertices from the target paragraph model based on preset rules.
[0128] For example, in this invention, in order to achieve a five-stage visual effect of full transparency → gradual appearance → full appearance → gradual disappearance → full transparency, the electronic device presets to extract 4 feature vertices (corresponding to 4 segmentation nodes, splitting the target paragraph model into 5 sub-paragraphs). The extraction rule can be to extract feature vertices proportionally according to the length of the target paragraph model or to extract feature vertices non-proportionally according to the visual perception rules.
[0129] For example, based on the sorted vertex set and preset extraction rules, a preset number of target segment vertices V are extracted and labeled according to the driving direction as V1 (first segmentation point of the near segment), V2 (second segmentation point of the near segment), V3 (first segmentation point of the far segment), and V4 (second segmentation point of the far segment), serving as the core nodes for subsequent target segment model splitting. For example, V1 is the one-fifth position of the target segment model along the vehicle's driving direction, V2 is the two-fifths position, V3 is the three-fifths position, and V4 is the four-fifths position.
[0130] Electronic devices can verify whether the extracted target paragraph vertices are valid vertices of the target paragraph model (non-redundant / non-distorted vertices), and whether the spacing between vertices matches the visual segmentation requirements (such as the spacing between fade-in / fade-out segments adapting to linear transparency mapping, and the spacing between fully visible segments covering the core visual range).
[0131] Step S207: Based on the vertices of each target segment, render the transparency of the target segment model to obtain the final 3D road model.
[0132] Specifically, step S207 above may include the following steps: Step S2071: Based on the vertices of each target paragraph, the target paragraph model is split into multiple sub-paragraph models.
[0133] Specifically, the electronic device can use the extracted target segment vertices V1, V2, V3, and V4 as segmentation nodes, and locate them in the ordered vertex set of the target segment model M along the driving direction (from near to far). The electronic device can then use these four segmentation nodes as boundaries to sequentially split the target segment model M into five consecutive sub-segment models along the driving direction from near to far: M1: from the starting point of the target segment model to V1 (the foremost of the near segment, corresponding to the fully transparent stage); M2: from V1 to V2 (the near segment, corresponding to the fading stage); M3: from V2 to V3 (the middle segment, corresponding to the fully visible stage); M4: from V3 to V4 (the far segment, corresponding to the fading stage); M5: from V4 to the end point of the target segment model (the farthest point, corresponding to the fully transparent stage). The electronic device can perform linear interpolation smoothing on the beginning and end boundary vertices of each sub-segment model to ensure the continuity of connections between sub-segments and avoid model tearing and jagged edges caused by splitting. Then, stage markers (such as M1-fully transparent, M2-fade-in) are added to each sub-segment model according to the driving direction to provide a matching basis for subsequent transparency calibration.
[0134] Step S2072: Determine the transparency of each sub-segment model based on its position. Specifically, step S2072 above may include the following steps: Step b1: Arrange the sub-segment models according to the direction of travel of the target vehicle based on their corresponding positions.
[0135] Specifically, the electronic device can determine a unified sorting direction by using the camera position of the target vehicle or the starting point of the target display screen as the near reference point, and the far reference point as the far reference point along the driving direction or the end point of the display screen. The Z-axis coordinates of the center vertex of each sub-segment model in world space and the center pixel coordinates on the screen are identified as the quantification basis for the sub-segment model's position. Based on the quantification basis of the sub-segment model's position, all sub-segment models are sorted from near to far along the driving direction, forming a unique sequence to ensure that the sorting result is consistent with the driver's visual observation order.
[0136] Step b2: Based on the arrangement order of each sub-segment model, determine the transparency of each sub-segment model to achieve the rendering effect of the target segment model from fully transparent to gradually visible, from gradually visible to fully visible, and then from fully visible to gradually invisible and back to fully transparent.
[0137] Specifically, electronic devices can match the five-stage visual effect—fully transparent-fade-fully visible-fade-fully transparent—with an ordered sequence of sub-segment models one by one.
[0138] The aforementioned electronic device uses four segmentation nodes as boundaries to divide the target segment model M into five consecutive sub-segments—M1, M2, M3, M4, and M5—along the driving direction from near to far. The electronic device can store three sets of fixed transparency values in a parameter table. In each rendering cycle, it directly calls the preset fixed transparency values corresponding to M1, M3, and M5, matching the corresponding sub-segments to complete the transparency overlay rendering, eliminating the need for complex algorithms to calculate transparency levels in real time. Specifically, M1 is set to a fully transparent state, M3 to a fully visible state, and M5 to a fully transparent state. During the fully transparent stage, the preset fixed transparency value is 0, and during the fully visible stage, the preset fixed transparency value is 1, with no change in value. Linear transparency calibration: A linearly continuously changing transparency range is calibrated for M2 (fade in) and M4 (fade out). For example, as shown... Figure 4 The image shows a rendering effect of the target paragraph model transitioning from fully transparent to gradually visible, from gradually visible to fully visible, and then from fully visible to gradually invisible and back to fully transparent.
[0139] Specifically, M2 increases linearly from 0 at the starting point (close to M1) to 1 at the ending point (close to M3), ensuring a uniform and seamless gradual development process.
[0140] For example, the electronic device can calculate the transparency of each pixel in M2 according to the following formula: , where z wStart1 is the Z-axis coordinate of the starting pixel in the M2 sub-segment model, and Start2 is the Z-axis coordinate of the ending pixel in the M2 sub-segment model.
[0141] M4 decreases linearly from 1 at the starting point (near M3) to 0 at the ending point (near M5), ensuring a uniform fading process without faults.
[0142] For example, an electronic device can calculate the transparency of each pixel in M4 according to the following formula: , where z w End1 is the Z-axis coordinate of each pixel in the M4 sub-segment model, End2 is the Z-axis coordinate of the starting pixel in the M4 sub-segment model, and End2 is the Z-axis coordinate of the ending pixel in the M2 sub-segment model.
[0143] Electronic devices can bind the transparency parameters of each sub-segment model to the model, forming a one-to-one correspondence between the sub-segment model and the transparency parameters, which can then be used for subsequent rendering.
[0144] Step S2073: Based on the transparency of each sub-segment model, render the transparency of the target segment model to obtain the final displayed 3D road model.
[0145] Specifically, the electronic device can synchronously transmit the vertex coordinates, mesh structure, original visual attributes, and bound transparency parameters of each sub-segment model to the fragment shader to initialize the pixel-by-pixel transparency rendering environment.
[0146] Then, pixel-by-pixel transparency rendering calculations are performed for each sub-segment model. For fixed transparency models (M1, M3, M5), the Alpha channel (transparency) in the original RGBA color value of the pixel is directly assigned a fixed value (0 or 1). Specifically, the Alpha channel corresponding to M1 and M5 is directly assigned a fixed value of 0, while the Alpha channel corresponding to M3 is directly assigned a fixed value of 1.
[0147] For the linear transparency models (M2, M4), based on the position of the pixel in the sub-segment model, the corresponding Alpha channel value of the pixel is calculated through piecewise linear mapping to achieve a linear transition from 0 to 1 or from 1 to 0, and then the value is assigned to the pixel.
[0148] Finally, electronic devices can limit all calculations to the alpha channel value within the range of [0,1] using the clamp function, preventing transparency from exceeding the effective range. For example, the formula is: .
[0149] Finally, the electronic device re-merges all sub-segments of the model that have completed transparency rendering into a continuous whole model according to their original spatial positions and mesh topology. During the merging process, the boundary pixels of adjacent sub-segments are processed to smoothly transition transparency, avoiding visual discontinuities between sub-segments. Finally, the electronic device performs post-rendering optimizations on the merged whole model, including lighting, texture, and anti-aliasing, to ensure the model's visual effect is natural and clear, matching the visual design specifications of the in-vehicle HMI. The optimized model is then selected as the final 3D road model for display and transmitted to the electronic device's display output module for direct real-time display on the target screen.
[0150] The model rendering method provided in this application embodiment obtains the initial vertex coordinates of each vertex of the initial 3D road model in world coordinates. It accurately extracts the standardized spatial coordinates of the model vertices, providing unified and accurate basic data for subsequent vertex position calculations, ensuring the consistency and accuracy of coordinate calculations. Simultaneously, the world coordinates conform to the actual driving space of the vehicle, aligning model deformation with the real driving scene space. The method determines the target offset. Combining turn signal operation and navigation guidance commands, the target offset is dynamically set, achieving accurate visual prediction of lane change / guidance scenarios. This step provides a clear lateral translation target for constant term calculation, ensuring that the offset direction of the road model is completely consistent with the driver's lane change intention or navigation path guidance, improving the intuitiveness and operational compliance of visual guidance. The method calculates the initial constant term parameter value. The target offset is mapped to a polynomial constant term, realizing the overall lateral translation of the 3D road model. This parameter serves as a unified lateral offset benchmark for all vertices, accurately achieving visual effects such as lane centering and navigation lane change guidance, ensuring that the overall model position conforms to real driving needs or guidance directions. The method extracts lane offsets. Accurately extracting the vehicle's current lateral position deviation relative to the lane centerline provides a realistic physical input basis for primary term calculations. This parameter quantifies the vehicle's real-time offset state within the lane and is the fundamental data source for achieving visual effects such as lane keeping correction and lane departure warning. Calculating initial primary term parameter values converts lane offset into primary term parameters, realizing the lateral tilt / shear deformation of the road model. This parameter allows the road model to exhibit a corresponding tilt posture based on the degree of vehicle offset, simulating the driver's visual expectation of straightening the direction, solving the visual abruptness of traditional models that only perform translation without dynamic tilting, and enhancing the realism of the driving experience. Calculating control term coefficients based on steering wheel angle and current vehicle speed. Converting the driver's real-time steering operation into road curvature parameters accurately reflects the driver's driving intentions; simultaneously, vehicle speed is introduced for dynamic correction, making the steering response smoother at high speeds and more sensitive at low speeds, improving the rationality of model deformation and driving safety at different speeds. Calculating look-ahead term coefficients based on navigation path curvature and lane line recognition curvature. By fusing dual-source road information from navigation and camera perception, realistic and stable curvature data of the road ahead is obtained. Real-time camera curvature is prioritized for accuracy, while navigation curvature is used as a fallback when no effective visual data is available, significantly improving the robustness and scene adaptability of the road model. The control and look-ahead coefficients are fused to obtain initial quadratic parameter values. Driver control and the actual road direction are dynamically weighted and combined, allowing the road model to both follow the driver's input and conform to the actual road conditions. Dynamic weighting adapts to different scenarios such as low speed and high speed, making the quadratic parameters more stable and natural, effectively avoiding model jitter and abrupt changes, and ensuring smooth and reliable rendering. Cubic terms are calculated based on the quadratic parameters. Transition curve correction for curve entrances / exits is implemented.This parameter performs nonlinear fine-tuning of the basic curvature, resolving the "harsh angle" problem at curvature changes in pure quadratic curves. This makes the curvature transition of the road model smoother and more natural, conforming to the geometry of real roads and the driver's visual perception habits. Then, the initial parameter values are smoothed to obtain the target parameter values. Through exponential filtering, rate-of-change limiting, and dead-zone noise reduction, the problems of model jitter and harsh deformation caused by sensor noise and signal abrupt changes are effectively solved. Temporal domain smoothing ensures the continuity of parameter changes, avoiding abrupt flickering in the image. Spatial domain limiting prevents the model from "violently jerking," significantly improving visual stability, especially in high-speed scenes. Dead-zone processing eliminates minor curvature artifacts in straight-line scenes, ensuring image purity. The final output is a stable and smooth target parameter value, guaranteeing the safety and comfort of in-vehicle human-machine interaction.
[0151] Next, the initial z-axis coordinates of each vertex are obtained from the initial vertex coordinates. The core dimension coordinates that determine the model's deformation differentiation are accurately extracted. The z-axis coordinate directly represents the distance between the vertex and the camera in the driving direction, providing a key variable for calculating differentiated offsets for each vertex. This ensures the model can achieve natural bending / tilting effects with varying degrees of offset depending on distance, conforming to the visual shape of a real road. The X-axis offset of each vertex is calculated based on the target parameter values and the initial z-axis coordinates. Precise calculation of the offset for each vertex is achieved through a polynomial function. The differentiation of the z-axis coordinates enables non-linear, dynamic deformation of the model that conforms to actual driving conditions. Offsets are calculated only on the X-axis, ensuring the model deformation conforms to the spatial logic of the in-vehicle road scene. Simultaneously, the unified calculation logic is adapted to GPU parallel computing, balancing computational accuracy with the lightweight rendering requirements of electronic devices. The target vertex coordinates of each vertex are determined based on the position offset and the initial vertex coordinates. Precise updates of vertex positions are achieved through coordinate superposition. Offset calculations are performed only on the lateral side of the road, preserving the original mesh topology of the model and avoiding tearing or distortion after deformation, ensuring the integrity and rationality of the 3D road model's geometry. The target 3D road model is obtained based on the target vertex coordinates. The 3D road model is reconstructed by updating the vertex coordinates, realizing the transformation from the initial model to the target model that dynamically deforms with the vehicle's signals. This allows the model to accurately match the vehicle's steering, lane changing, and deviation actions, restoring a realistic in-vehicle 3D road visual effect. At the same time, the reconstruction process retains the original material, texture, and other attributes of the model to ensure the consistency of visual presentation.
[0152] Obtain the preset visible display length of the target 3D road model on the target display screen. Define a precise length threshold for the target 3D road model's screen display, adapting to the target display screen's size, pixel range, and in-vehicle visual design specifications. This avoids visual redundancy or missing road information caused by excessively long or short model displays, and provides a quantitative basis for subsequent selection of model segments within the screen's visible range. Determine the target segment model based on the preset visible display length. Select road model segments within the screen's visible range, eliminating redundant model parts exceeding the display length. This reduces meaningless rendering calculations, significantly lowers the GPU computing power consumption of the vehicle's infotainment system, adapts to the lightweight rendering requirements of in-vehicle systems, and ensures that the final displayed 3D road model accurately matches the screen's field of view. Determine a preset number of target segment vertices from the target segment model based on preset rules. The extracted feature vertices serve as precise segmentation nodes for the target segment model's transparency segmentation, providing a basis for subsequent segmented transparency rendering of the target segment model. This replaces the high-computational-power per-vertex rendering method, further optimizing rendering efficiency while ensuring that the transparency segmentation conforms to the "fade-show-full-fade-hide" in-vehicle visual perception pattern. The target paragraph model is divided into multiple sub-paragraph models based on the vertices of the target paragraph. Feature vertices are used as precise segmentation nodes to segment the target paragraph model, allowing each sub-paragraph to correspond to an independent transparency rendering stage, laying the foundation for segmented transparency rendering of "full transparency - gradual appearance - full appearance - gradual disappearance". After segmentation, the original mesh and visual attributes of the model are preserved, ensuring continuous connection between sub-paragraphs without tearing or discontinuity issues. The sub-paragraph models are arranged according to the vehicle's driving direction based on their positions. A unified spatial sorting logic for the sub-paragraph models is established to ensure that the sorting result is consistent with the driver's actual visual observation order, providing a clear and orderly basis for subsequent sequential transparency calibration. Simultaneously, position-related sorting avoids transparency rendering logic errors caused by disordered sub-paragraph order, ensuring that the gradual appearance and disappearance visual stages match the actual field of view. The transparency of each sub-paragraph model is determined based on the arrangement order. The visual effect of "fully transparent → gradually appearing → fully visible → gradually disappearing → fully transparent" is precisely matched according to the order of the driving direction. This allows different segments to correspond to appropriate transparency parameters, achieving a smooth transition effect in the final 3D road model where the near section blends naturally into the background, the middle section is clearly displayed, and the far section is softly blurred. This solves the visual abruptness problem of hard clipping in traditional 3D road models, improving the realism of in-vehicle 3D road scenes and driving visual comfort. Finally, the final 3D road model is obtained by rendering the transparency of each segment. The transparency of each segment is accurately rendered and merged into the overall final 3D road model, achieving a natural gradual appearance and disappearance visual effect. This allows the final 3D road model to blend smoothly with the screen background, simulating a realistic fog-like scene. The entire process is based on segmented rendering, which consumes low computing power and is suitable for the lightweight requirements of electronic devices. The final 3D road model combines dynamic deformation and natural visual transitions, significantly improving the visual experience of in-vehicle HMIs.
[0153] This embodiment also provides a model rendering apparatus for implementing the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that performs a predetermined function. Although the apparatus described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.
[0154] This embodiment provides a model rendering device, such as Figure 5 As shown, it includes: The first acquisition module 301 is used to acquire the initial 3D road model corresponding to the road where the target vehicle is traveling. The second acquisition module 302 is used to acquire the vehicle-mounted signal data corresponding to the target vehicle. The first rendering module 303 is used to obtain the initial vertex coordinates of each vertex in the initial 3D road model in world coordinates; calculate the position offset of each vertex in the initial 3D road model based on vehicle signal data and initial vertex coordinates; determine the target vertex coordinates of each vertex based on the position offset and initial vertex coordinates; and obtain the target 3D road model based on the target vertex coordinates.
[0155] In some optional implementations, the first rendering module 303 is specifically used to calculate the target parameter value of the preset polynomial function corresponding to the position offset based on the vehicle signal data; obtain the initial z-axis coordinates corresponding to each vertex from the initial vertex coordinates; and calculate the X-axis direction offset corresponding to each vertex based on the target parameter value and the initial z-axis coordinates.
[0156] In some optional implementations, the preset polynomial function is a cubic polynomial function; the first rendering module 303 is specifically used to calculate the initial parameter values of the cubic polynomial function corresponding to the position offset based on the vehicle signal data; the initial parameter values include the initial constant term parameter values, the initial first term parameter values, the initial quadratic term parameter values, and the initial cubic term parameter values; the initial parameter values are smoothed to obtain the target parameter values corresponding to the cubic polynomial function.
[0157] In some optional implementations, the vehicle-mounted signal data includes steering wheel angle, current vehicle speed, yaw rate, navigation path curvature, lane line recognition curvature, turn signal status, and lane offset. The first rendering module 303 is specifically used to determine the target offset corresponding to the target vehicle based on the turn signal status and the navigation command corresponding to the target vehicle; calculate the initial constant term parameter value corresponding to the cubic polynomial function based on the target offset; extract the lane offset of the target vehicle relative to the road centerline from the vehicle-mounted signal data; calculate the initial linear term parameter value corresponding to the cubic polynomial function based on the lane offset; calculate the initial quadratic term parameter value corresponding to the cubic polynomial function based on the steering wheel angle, current vehicle speed, navigation path curvature, and lane line recognition curvature in the vehicle-mounted signal data; and calculate the initial cubic term parameter value corresponding to the cubic polynomial function based on the initial quadratic term parameter value.
[0158] In some optional implementations, the first rendering module 303 is specifically used to calculate the control term coefficient based on the steering wheel angle and the current vehicle speed; calculate the look-ahead term coefficient based on the curvature of the navigation path and the curvature of the lane line recognition; and perform fusion processing on the control term coefficient and the look-ahead term coefficient to obtain the initial quadratic term parameter value.
[0159] In some alternative implementations, such as Figure 6 As shown, the aforementioned model rendering device further includes: The third acquisition module 304 is used to acquire the preset visible display length of the target 3D road model on the target display screen; The first determining module 305 is used to determine the target segment model of the target 3D road model displayed on the target display screen based on the preset visible display length; The second determining module 306 is used to determine a preset number of target paragraph vertices from the target paragraph model based on preset rules; The second rendering module 307 is used to render the transparency of the target segment model based on the vertices of each target segment to obtain the final displayed 3D road model.
[0160] In some optional implementations, the second rendering module 307 is specifically used to split the target paragraph model into multiple sub-segment models based on the vertices of each target paragraph; determine the transparency of each sub-segment model according to its corresponding position; and render the transparency of the target paragraph model based on the transparency of each sub-segment model to obtain the final displayed 3D road model.
[0161] In some optional implementations, the second rendering module 307 is specifically used to arrange the sub-segment models according to the direction of the target vehicle's travel based on the corresponding positions of each sub-segment model; and to determine the transparency of each sub-segment model according to the arrangement order of each sub-segment model, so as to achieve the rendering effect of the target segment model from fully transparent to gradually visible, from gradually visible to fully visible, and then from fully visible to gradually invisible and then back to fully transparent.
[0162] The model rendering apparatus provided in this embodiment of the invention can execute the model rendering method provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects for executing the method. Further functional descriptions of the various modules and units described above are the same as in the corresponding embodiments described above, and will not be repeated here.
[0163] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention.
[0164] The following is a detailed reference. Figure 7 This diagram illustrates a suitable structure for implementing an electronic device according to embodiments of the present invention. The electronic device may include a processor (e.g., a central processing unit, a graphics processing unit, etc.) 01, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 02 or a program loaded from a memory 08 into a random access memory (RAM) 03. The RAM 03 also stores various programs and data required for the operation of the electronic device. The processor 01, ROM 02, and RAM 03 are interconnected via a bus 04. An input / output (I / O) interface 05 is also connected to the bus 04.
[0165] Typically, the following devices can be connected to I / O interface 05: input devices 06 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 07 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; memory devices 08 including, for example, magnetic tapes, hard disks, etc.; and communication devices 09. Communication device 09 allows electronic devices to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 7 Electronic devices with various devices are shown, but it should be understood that it is not required to implement or have all of the devices shown, and more or fewer devices may be implemented or have instead.
[0166] In particular, according to embodiments of the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of the present invention include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication device 09, or installed from memory 08, or installed from ROM 02. When the computer program is executed by processor 01, it performs the functions defined in the model rendering method of the embodiments of the present invention.
[0167] Figure 7 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of use of the embodiments of the present invention.
[0168] This invention also provides a computer-readable storage medium. The methods described above according to embodiments of the invention can be implemented in hardware or firmware, or implemented as computer code that can be recorded on a storage medium, or implemented as computer code downloaded over a network and originally stored on a remote storage medium or a non-transitory machine-readable storage medium and then stored on a local storage medium. Thus, the methods described herein can be processed by software stored on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. The storage medium can be a magnetic disk, optical disk, read-only memory, random access memory, flash memory, hard disk, or solid-state drive, etc.; further, the storage medium can also include combinations of the above types of memory. It is understood that computers, processors, microprocessor controllers, or programmable hardware include storage components capable of storing or receiving software or computer code. When the software or computer code is accessed and executed by the computer, processor, or hardware, the model rendering method shown in the above embodiments is implemented.
[0169] A portion of this invention can be applied as a computer program product, such as computer program instructions, which, when executed by a computer, can invoke or provide the methods and / or technical solutions according to the invention through the operation of the computer. Those skilled in the art will understand that the forms in which computer program instructions exist in a computer-readable medium include, but are not limited to, source files, executable files, installation package files, etc. Correspondingly, the ways in which computer program instructions are executed by a computer include, but are not limited to: the computer directly executing the instructions, or the computer compiling the instructions and then executing the corresponding compiled program, or the computer reading and executing the instructions, or the computer reading and installing the instructions and then executing the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to a computer.
[0170] Although embodiments of the invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations all fall within the scope defined by the appended claims.
Claims
1. A model rendering method, characterized in that, The method includes: Obtain the initial 3D road model corresponding to the road traveled by the target vehicle; Acquire the vehicle-mounted signal data corresponding to the target vehicle; Obtain the initial vertex coordinates of each vertex in the initial 3D road model in world coordinates; Based on the vehicle signal data and the initial vertex coordinates, calculate the position offset of each vertex in the initial 3D road model; Based on the position offset and the initial vertex coordinates, determine the target vertex coordinates corresponding to each vertex; Based on the target vertex coordinates, a 3D road model of the target is obtained.
2. The method according to claim 1, characterized in that, The position offset is the offset in the X-axis direction; the calculation of the position offset corresponding to each vertex in the initial 3D road model based on the vehicle-mounted signal data and the initial vertex coordinates includes: Based on the vehicle signal data, calculate the target parameter value of the preset polynomial function corresponding to the position offset; Obtain the initial z-axis coordinates corresponding to each vertex from the initial vertex coordinates; Based on the target parameter value and the initial z-axis coordinate, calculate the X-axis offset corresponding to each vertex.
3. The method according to claim 2, characterized in that, The preset polynomial function is a cubic polynomial function; the calculation of the target parameter value of the preset polynomial function corresponding to the position offset based on the vehicle signal data includes: Based on the vehicle-mounted signal data, the initial parameter values corresponding to the cubic polynomial function corresponding to the position offset are calculated; the initial parameter values include the initial constant term parameter value, the initial linear term parameter value, the initial quadratic term parameter value, and the initial cubic term parameter value; The initial parameter values are smoothed to obtain the target parameter values corresponding to the cubic polynomial function.
4. The method according to claim 3, characterized in that, The vehicle system signal data includes steering wheel angle, current vehicle speed, yaw rate, navigation path curvature, lane line recognition curvature, turn signal status, and lane deviation. The step of calculating the initial parameter value of the cubic polynomial function corresponding to the position offset based on the vehicle-mounted signal data includes: Based on the turn signal status and the navigation command corresponding to the target vehicle, the target offset corresponding to the target vehicle is determined; Based on the target offset, calculate the parameter value of the initial constant term corresponding to the cubic polynomial function; Extract the lane offset of the target vehicle relative to the road centerline from the vehicle signal data; Based on the lane offset, calculate the parameter value of the initial linear term corresponding to the cubic polynomial function; Based on the steering wheel angle, current vehicle speed, navigation path curvature, and lane line recognition curvature in the vehicle system signal data, calculate the initial quadratic term parameter value corresponding to the cubic polynomial function; Based on the initial quadratic term parameter value, calculate the initial cubic term parameter value corresponding to the cubic polynomial function.
5. The method according to claim 4, characterized in that, The calculation of the initial quadratic term parameter values corresponding to the cubic polynomial function based on the steering wheel angle, current vehicle speed, navigation path curvature, and lane line recognition curvature in the vehicle system signal data includes: Calculate the control coefficient based on the steering wheel angle and the current vehicle speed; Calculate the look-ahead coefficient based on the curvature of the navigation path and the curvature of the lane line recognition; The control term coefficient and the look-ahead term coefficient are fused to obtain the initial quadratic term parameter value.
6. The method according to claim 1, characterized in that, After obtaining the target 3D road model based on the target vertex coordinates, the method further includes: Obtain the preset visible display length of the target 3D road model on the target display screen; Based on the preset visible display length, the target segment model of the target 3D road model is determined to be displayed on the target display screen; Based on preset rules, a preset number of target paragraph vertices are determined from the target paragraph model; Based on the vertices of each target segment, the transparency of the target segment model is rendered to obtain the final displayed 3D road model.
7. The method according to claim 6, characterized in that, The step of rendering the transparency of the target segment model based on the vertices of each target segment to obtain the final displayed 3D road model includes: Based on the vertices of each target paragraph, the target paragraph model is split into multiple sub-paragraph models; The transparency of each sub-segment model is determined based on its position. Based on the transparency of each sub-segment model, the transparency of the target segment model is rendered to obtain the final displayed 3D road model.
8. The method according to claim 7, characterized in that, The step of determining the transparency of each sub-segment model based on its position includes: Based on the corresponding positions of each sub-segment model, the sub-segment models are arranged according to the direction of travel of the target vehicle; Based on the arrangement order of each sub-segment model, the transparency of each sub-segment model is determined, so as to achieve the rendering effect of the target segment model from fully transparent to gradually visible, from gradually visible to fully visible, and then from fully visible to gradually invisible and then fully transparent again.
9. A model rendering device, characterized in that, The device includes: The first acquisition module is used to acquire the initial 3D road model corresponding to the road where the target vehicle is traveling. The second acquisition module is used to acquire the vehicle-mounted signal data corresponding to the target vehicle; The first rendering module is used to obtain the initial vertex coordinates of each vertex in the initial 3D road model in world coordinates; calculate the position offset of each vertex in the initial 3D road model based on the vehicle signal data and the initial vertex coordinates; determine the target vertex coordinates of each vertex based on the position offset and the initial vertex coordinates; and obtain the target 3D road model based on the target vertex coordinates.
10. An electronic device, characterized in that, include: A memory and a processor are communicatively connected, the memory stores computer instructions, and the processor executes the model rendering method of any one of claims 1 to 8 by executing the computer instructions.
11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing a computer to execute the model rendering method of any one of claims 1 to 8.
12. A computer program product, characterized in that, Includes computer instructions for causing a computer to execute the model rendering method of any one of claims 1 to 8.