Driving engine design method and system based on 3D game vehicle
By calculating the three-dimensional coordinates of the viewpoint based on the field of view azimuth, centerline azimuth and vehicle deformation profile in 3D games, and combining static and dynamic vector rendering, the problem of disconnection between perspective and vehicle status is solved, and the immersive and interactive experience of vehicle driving in the game is enhanced.
Patent Information
- Application Number
- CN202511215125.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-28
- Publication Date
- 2025-10-03
- Estimated Expiration
- 2045-08-28
AI Technical Summary
The existing 3D game vehicle driving engine design ignores the impact of vehicle deformation on the viewing angle, resulting in a disconnect between the viewing angle and the vehicle state, reducing the sense of immersion, and the dynamic associated component combination linkage effect is poor, which weakens the interactive experience.
Based on the user permissions of the target vehicle, the driving position point is determined and the scene point is extracted. The three-dimensional coordinates of the viewpoint are calculated by combining the field of view azimuth, centerline azimuth and vehicle deformation contour. Through static and dynamic vector rendering methods, a strong binding between the perspective and vehicle deformation is achieved, combined with player operation feedback.
It improves the realism of the driving experience, reduces invalid rendering, adapts to the performance of different devices, restores real operation feedback through static and dynamic vectors, and creates a highly immersive 3D vehicle driving experience.
Smart Images

Figure CN120733348A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of 3D game design, and in particular to a driving engine design method and system based on 3D game vehicles. Background Art
[0002] With the continuous development of 3D gaming technology, players' requirements for in-game vehicle driving experience are increasing. They not only pursue high-definition and high-fidelity graphics, but also expect scene rendering to be deeply adapted to vehicle dynamics and player operations. However, existing 3D game vehicle driving engine designs have many shortcomings, including the following: When determining the viewpoint, existing technologies often only consider the field of view azimuth and centerline azimuth, ignoring the effects of vehicle deformation, such as collision deformation and acceleration pitch, on the first-person perspective. After the vehicle deforms, the physical position and angle of the player's actual field of view change, but the engine fails to adapt in a timely manner, causing a disconnect between the perspective and the vehicle's state and reducing immersion. For example, after a car crashes, the front of the car is dented, but the player's perspective is still calculated based on the undeformed cockpit, resulting in an awkward visual experience. Furthermore, existing technologies do not deeply integrate viewpoint behavioral operations, such as player-controlled switching of lights and windshield wipers, and insufficiently consider the combination of dynamically associated components. For example, the interaction between splashes from a high-speed vehicle and the wet, reflective surface of the road is poor. Consequently, they fail to accurately reflect changes in the visual presentation of a scene point, resulting in unintuitive feedback and a weakened interactive experience.
[0003] Therefore, the present invention proposes a driving engine design method and system based on 3D game vehicles. Summary of the Invention
[0004] The present invention provides a driving engine design method and system based on 3D game vehicles to solve the above-mentioned technical problems.
[0005] The present invention provides a method for designing a driving engine based on a 3D game vehicle, comprising: Step 1: Determine the driving location of the target vehicle in the 3D game scene based on the user permissions of the target vehicle, and extract the scene points to obtain the sub-scene; Step 2: Taking the target vehicle as the first perspective, determine the three-dimensional coordinates of each driving position of the target vehicle in the sub-scene based on different combinations of field of view azimuth angles, centerline azimuth angles, and vehicle deformation profiles; Step 3: Based on the standard visualization range of each viewpoint at the same scene point and the behavioral operation list of the corresponding viewpoint, sequentially determine the static rendering vector of each first rendering point in the standard visualization range under each behavioral operation in the behavioral operation list; Step 4: determining the dynamic rendering vector corresponding to the first rendering point in each dynamic associated component combination according to the list of dynamic associated components of the first rendering point; Step 5: Based on the static rendering vector and the dynamic rendering vector, and in combination with the straight-line distance between the first rendering point and the viewpoint and the game authority of the target vehicle, determine the rendering mode of each first rendering point and perform driving rendering.
[0006] Preferably, step 2 includes: Determining real-time dynamic parameters of the target vehicle at a driving position, and predicting next instantaneous parameters based on the real-time dynamic parameters, and determining a first weight based on a field of view azimuth, a second weight based on a centerline azimuth, and a third weight based on a vehicle deformation profile, wherein the real-time dynamic parameters include driving acceleration, steering curvature, and vehicle body roll angle; Determining a first initial point of a first azimuth angle combination based on real-time dynamic parameters, and simultaneously determining a second initial point of a second azimuth angle combination based on predicted next instantaneous parameters, wherein a first vertical line based on the field of view azimuth angle, a second vertical line based on the centerline azimuth angle, and a third vertical line based on the vehicle deformation profile are obtained based on the azimuth angle combination, and corresponding initial points are obtained based on the first vertical line, the second vertical line, the third vertical line, and preset cockpit reference coordinates called based on the vehicle model parameters of the target vehicle; The viewpoint range corresponding to the driving position point is determined according to the first initial point and the second initial point, and the viewpoint range is indented according to the first weight, the second weight and the third weight to obtain the three-dimensional coordinates of the viewpoint.
[0007] Preferably, sequentially determining the static presentation vector of each first presentation point in the standard visualization range under each behavior operation in the behavior operation list includes: Taking each viewpoint as a reference and rotating it by 0.1°, a rotation region set corresponding to the viewpoint is obtained, and each region point in each rotation region of the rotation region set is regarded as a scene point; Classify the first presentation point within the standard visualization range into different types to obtain a presentation point type set including road surface type, vegetation type, building type, and dynamic object type, and configure a basic static attribute vector for each type of presentation point; A static rendering vector is generated for each first rendering point based on a preset association influence weight between each behavioral operation and the rendering point type in the behavioral operation list, a field of view weight coefficient of the first rendering point based on each behavioral operation, and a basic static attribute vector corresponding to the rendering point type, wherein the static rendering vector includes a color channel value, a texture mapping coordinate, and a transparency parameter.
[0008] Preferably, determining the first presentation point based on the field of view weight coefficient of each behavioral operation includes: Determining a dynamic attenuation reference value of the field of view based on the real-time dynamic parameters and the real-time torque, wherein the absolute value of the driving acceleration is negatively correlated with the reference value, the steering curvature is negatively correlated with the attenuation gradient of the reference value along the steering direction, and the vehicle body roll angle is negatively correlated with the reference value; Performing saliency classification on the first presentation point within the standard visualization range, wherein the saliency classification is based on the spatial angle between the presentation point and the driving path, the collision risk coefficient of the presentation point, and the texture complexity of the presentation point, to obtain a set of high-saliency presentation points, a set of medium-saliency presentation points, and a set of low-saliency presentation points; With the viewpoint as the origin, radial grid lines with an interval of 0.03° are established along the polar coordinate angle. A layered height grid surface is established along the depth direction of the field of view to form a three-dimensional grid. The grid cells where the different saliency presentation point sets are located are subjected to corresponding attenuation processing. An intersection operation is performed on the attenuated grid and the boundary of the rotation area, and an edge compensation factor is activated for the grid cells in the boundary transition area. Finally, a field of view weight coefficient is generated for each first presentation point in the standard visualization range, where the edge compensation factor is related to the square of the speed of the target vehicle and the relative influence of the first presentation point based on the corresponding behavioral operation.
[0009] Preferably, the edge compensation factor is activated for the grid cells in the boundary transition area, including: The grid cells in the boundary transition area are divided into subgrids and parent grids according to their spatial relationship with the target vehicle and the standard visualization range; Based on the square of the vehicle's instantaneous speed and the steering angular velocity direction correction coefficient, the first compensation factor corresponding to the parent grid is calculated; If the intersection-over-union ratio of the corresponding subgrid with its parent grid is 1, the second compensation factor of the corresponding subgrid is calculated based on the first compensation factor; If the intersection-and-union ratio of the corresponding subgrid with the multiple parent grids is greater than 0, a third compensation factor of the corresponding subgrid is calculated based on the first compensation factor and the average of the intersection-and-union ratios with the multiple parent grids; The dynamic compensation factors of all subgrids and parent grids involved in the grid cells in the boundary transition zone are weighted superimposed, and the edge compensation factor is obtained by combining the relative influence of the current behavior operation on the vehicle state.
[0010] Preferably, determining the dynamic presentation vector corresponding to the first presentation point in each dynamic associated component combination according to the list of dynamic associated components of the first presentation point includes: Performing hierarchical weight sorting on a list of dynamically associated components of the first rendering point, the dynamically associated components including: a physical collision component, a light and shadow projection component, a particle effect component, and a material deformation component, the hierarchical weight sorting being determined based on the strength of the component's impact on the visual change of the rendering point; Construct a component interaction coefficient matrix, where the matrix element values represent the synergistic influence coefficients when different types of dynamically associated components are combined; Based on each dynamically associated component combination, an initial dynamic vector is calculated based on the component level weight and the component interaction coefficient matrix, wherein the initial dynamic vector includes a position offset, a rotation angular velocity, and a texture stretch coefficient; Determining the interaction behavior type of the physical collision component based on each combination of the dynamically associated components, and determining the change in the characteristic object before and after the interaction between the physical collision component and the corresponding dynamically associated component combination, to obtain a collision warning index, wherein the interaction behavior type includes: irrelevant interaction type, allowed interaction type, and prohibited interaction type; According to the correlation between the collision warning index and each dynamic element, and in combination with the collision warning index, the initial dynamic vector is corrected to generate a dynamic presentation vector including dynamic change rate and attenuation boundary parameters. The dynamic presentation vector is incrementally updated as the real-time state of the component combination changes.
[0011] Preferably, determining the rendering mode of each first rendering point includes: Determining a visual importance coefficient corresponding to the first presentation point based on the static presentation vector and the dynamic presentation vector, and determining a visual attenuation factor based on a straight-line distance between the first presentation point and the viewpoint, wherein a minimum value of the visual attenuation factor is not less than a set value of a lowest authority among the game permissions; A rendering mode that matches the visual importance coefficient and the visual attenuation factor is matched according to a coefficient-factor-mode comparison table.
[0012] The present invention provides a driving engine design system based on a 3D game vehicle, comprising: The point extraction module is used to determine the driving position of the target vehicle in the 3D game scene based on the user permissions of the target vehicle, and extract the scene points to obtain the sub-scene; a coordinate determination module, configured to determine, with the target vehicle as a first perspective, the three-dimensional coordinates of each driving position point of the target vehicle in the sub-scene based on different combinations of field of view azimuths, centerline azimuths, and vehicle deformation profiles; a static vector construction module, configured to sequentially determine, based on a standard visualization range of each viewpoint at the same scene point and a behavioral operation list corresponding to the viewpoint, a static rendering vector for each first rendering point in the standard visualization range under each behavioral operation in the behavioral operation list; a dynamic vector construction module, configured to determine, according to the list of dynamic associated components of the first rendering point, a dynamic rendering vector corresponding to the first rendering point in each combination of dynamic associated components; The mode determination module is used to determine the rendering mode of each first rendering point and perform driving rendering based on the static rendering vector and the dynamic rendering vector, and in combination with the straight-line distance between the first rendering point and the viewpoint and the game authority of the target vehicle.
[0013] Compared with the prior art, the present invention has the following advantages: The strong binding between perspective, vehicle deformation and player operation makes the driving experience more realistic; sub-scene interception and frustum clipping reduce invalid rendering, and permission layering adapts to different device performance; the combination of static and dynamic vectors covers color, light and shadow, and physical interaction, restoring the real-world operation feedback chain to create a highly immersive 3D vehicle driving experience.
[0014] Other features and advantages of the present invention will be described in the following description, and in part will become apparent from the description, or will be understood by practicing the present invention. The purpose and other advantages of the present invention can be realized and obtained by the structures particularly pointed out in the written description and the accompanying drawings.
[0015] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings: Figure 1 This is a flow chart of a method for designing a driving engine based on a 3D game vehicle in an embodiment of the present invention; Figure 2 This is a structural diagram of a driving engine design system based on a 3D game vehicle in an embodiment of the present invention. DETAILED DESCRIPTION
[0017] The preferred embodiments of the present invention are described below with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present invention, and are not used to limit the present invention.
[0018] The present invention provides a driving engine design method based on 3D game vehicles, such as Figure 1 Shown, including: Step 1: Determine the driving location of the target vehicle in the 3D game scene based on the user permissions of the target vehicle, and extract the scene points to obtain the sub-scene; Step 2: Taking the target vehicle as the first perspective, determine the three-dimensional coordinates of each driving position of the target vehicle in the sub-scene based on different combinations of field of view azimuth angles, centerline azimuth angles, and vehicle deformation profiles; Step 3: Based on the standard visualization range of each viewpoint at the same scene point and the behavioral operation list of the corresponding viewpoint, sequentially determine the static rendering vector of each first rendering point in the standard visualization range under each behavioral operation in the behavioral operation list; Step 4: determining the dynamic rendering vector corresponding to the first rendering point in each dynamic associated component combination according to the list of dynamic associated components of the first rendering point; Step 5: Based on the static rendering vector and the dynamic rendering vector, and in combination with the straight-line distance between the first rendering point and the viewpoint and the game authority of the target vehicle, determine the rendering mode of each first rendering point and perform driving rendering.
[0019] In this embodiment, the target vehicle is a vehicle controlled by the player in the game, such as a racing car or an off-road vehicle, and includes a unique ID and permission configuration. The user permission is the scene access permission bound to the player's account. For example, ordinary players can only enter the novice track, and VIP players can unlock hidden mountain roads, etc. This is obtained through a pre-built permission-scene mapping table. For example, permission Lv3 corresponds to scene ID 007.
[0020] In this embodiment, the driving position point is a set of coordinate points where the vehicle can drive in the 3D scene, such as the road coordinates on a racetrack and the mountain coordinates in an off-road scene.
[0021] In this embodiment, scene point extraction uses a spatial cutting algorithm to intercept the area that matches the authority from the large scene. For example, when a VIP player enters, the terrain, vegetation, and building point cloud data of the hidden mountain road are extracted, and the sub-scene is the local scene data corresponding to the authority, such as only extracting the track section containing the hidden mountain road.
[0022] In this embodiment, the first perspective is a perspective that simulates the player's observation when sitting in a car, the field of view azimuth is the horizontal offset angle of the player's line of sight, and the centerline azimuth is the reference angle of the vehicle's driving direction.
[0023] In this embodiment, the vehicle deformation profile is the morphological change caused by vehicle collision, acceleration, etc. For example, the front of a racing car is dented after a collision, and the suspension of an off-road vehicle is stretched when climbing a slope.
[0024] In this embodiment, the viewpoint 3D coordinates represent the spatial position of the player's virtual eyes, and are derived based on the cockpit reference coordinates, the deformation compensation vector, and the viewpoint offset vector. The standard visualization range represents the spatial area visible from the viewpoint. The action list, which represents the player's interactions with the vehicle, such as turning on the lights, honking the horn, and switching the wipers, is pre-stored.
[0025] In this embodiment, the first rendering point is the smallest unit to be rendered in the scene, such as a piece of asphalt on the road or a leaf on a tree.
[0026] In this embodiment, the static rendering vector is data describing the basic visual attributes of the rendering point, including color RGB, texture coordinates, and transparency.
[0027] In this embodiment, the visual range is defined by using a viewing cone clipping algorithm to mark the presentation points within the viewing cone. The operation-presentation association is implemented as follows: a mapping table of operations and presentation point changes is established. For example, the light-on operation corresponds to a 20% increase in the brightness of the road presentation point, and the wiper operation corresponds to a 30% decrease in the transparency of the windshield presentation point, where the color vector is the base color × (1 + operation brightness coefficient).
[0028] In this embodiment, the dynamic association component is a module that affects the dynamic performance of the rendering point, such as the physical collision component, the particle special effect component, and the light and shadow projection component. The dynamic rendering vector is data that describes the dynamic changes of the rendering point, including position offset, rotation angular velocity, particle emission rate, etc.
[0029] In this embodiment, the rendering mode is a strategy for outputting the final image, such as real-time light and shadow rendering, baked texture rendering, and low-precision simplified rendering.
[0030] The beneficial effects of the above technical solution are: the strong binding of perspective, vehicle deformation and player operation makes the driving experience more realistic; the reduction of invalid rendering based on sub-scene interception and frustum clipping, and the adaptation of different device performance based on permission layering; the combination of static and dynamic vectors covers color, light and shadow, and physical interaction, restoring the real-world operation feedback chain, and creating a highly immersive 3D vehicle driving experience.
[0031] The present invention provides a method for designing a driving engine based on a 3D game vehicle, wherein step 2 comprises: Determining real-time dynamic parameters of the target vehicle at a driving position, and predicting next instantaneous parameters based on the real-time dynamic parameters, and determining a first weight based on a field of view azimuth, a second weight based on a centerline azimuth, and a third weight based on a vehicle deformation profile, wherein the real-time dynamic parameters include driving acceleration, steering curvature, and vehicle body roll angle; Determining a first initial point of a first azimuth angle combination based on real-time dynamic parameters, and simultaneously determining a second initial point of a second azimuth angle combination based on predicted next instantaneous parameters, wherein a first vertical line based on the field of view azimuth angle, a second vertical line based on the centerline azimuth angle, and a third vertical line based on the vehicle deformation profile are obtained based on the azimuth angle combination, and corresponding initial points are obtained based on the first vertical line, the second vertical line, the third vertical line, and preset cockpit reference coordinates called based on the vehicle model parameters of the target vehicle; The viewpoint range corresponding to the driving position point is determined according to the first initial point and the second initial point, and the viewpoint range is indented according to the first weight, the second weight and the third weight to obtain the three-dimensional coordinates of the viewpoint.
[0032] In this embodiment, the real-time dynamic parameters are the instantaneous motion state data of the target vehicle at the current driving position, reflecting the current dynamic characteristics of the vehicle. The core parameters include driving acceleration, steering curvature, and body roll angle. For example, the driving acceleration of the vehicle when accelerating can be , when braking suddenly ; When the vehicle turns left through a sharp bend, the steering curvature is ; When the vehicle turns right at high speed, the body tilts to the left with a roll angle of 8°.
[0033] The next instantaneous parameter is based on the current real-time dynamic parameter, which is obtained by the prediction algorithm in a short time. The prediction algorithm is based on the current real-time dynamic parameter and the dynamic parameter of the next moment as a sample to train the neural network model, such as the motion state parameter after 0.1 seconds, which is used to adapt the perspective and scene rendering in advance. For example, the current real-time driving acceleration is When the acceleration is predicted to become 0.1 seconds later due to power decay ; The current steering curvature is When the player continues to turn, it is predicted that after 0.1 seconds, the player will turn , and the next instantaneous acceleration = current acceleration + (current acceleration - previous frame acceleration) × 0.8, where 0.8 is the prediction coefficient, which can be adjusted according to the vehicle type.
[0034] The first weight is a coefficient used to quantify the influence of the field of view azimuth on subsequent viewpoint calculations. This is implemented based on a pre-established field of view azimuth change rate-first weight mapping table. When the absolute value of the field of view azimuth difference per frame is less than 1°, the weight is set to 0.2; when the absolute value of the field of view azimuth difference per frame is 1° ≤ < 3°, the weight is set to 0.3; when the rate of change is ≥ 3°, the weight is set to 0.5. For example, when the player is driving smoothly on a straight road, the first weight can be set to 0.2; when the player is frequently turning their head to observe on a complex road, the first weight can be increased to 0.5.
[0035] The centerline azimuth is the horizontal angle corresponding to the target vehicle's direction of travel. It serves as the reference direction for vehicle motion and ranges from 0° to 360°, with 0° representing the forward direction and 90° representing the right direction. For example, when a vehicle is traveling straight ahead on a beginner's track, the centerline azimuth is 0°, and after turning right and entering a fork in the road, it adjusts to 95°. The forward vector of the vehicle's Transform component is calculated and projected onto the horizontal plane. The angle between this vector and the scene's forward vector is the centerline azimuth. Simultaneously, steering operations are combined with real-time corrections to ensure that the azimuth is perfectly synchronized with the vehicle's heading.
[0036] The second weight is a coefficient used to quantify the influence of the centerline azimuth on the subsequent viewpoint calculation, which is implemented based on a pre-established driving speed-second weight mapping table. For example, when the speed is less than 30 km / h, the weight is set to 0.3.
[0037] The vehicle deformation profile is the outline of the target vehicle's morphological changes caused by collision, load, and extreme movements such as sudden acceleration and sudden braking. By combining skeletal animation with physical deformation, key deformation bones such as the front and suspension are set in the vehicle model. The collision force / pressure is calculated through the physics engine to drive the bone displacement; at the same time, the vertex shader is used to modify the vertex coordinates of the vehicle model in real time to present subtle deformations to reflect the real-time status of the vehicle's physical structure.
[0038] The third weight is a coefficient used to quantify the impact of the vehicle's deformed profile on subsequent viewpoint calculations. The deformation coefficient is defined as: deformation = actual deformation size / maximum allowable vehicle deformation size. A linear relationship is then established between the deformation coefficient and the third weight: the third weight = deformation coefficient × 0.8 + 0.1. This ensures that the weight is 0.1 for no deformation and 0.9 for full deformation. For example, if the vehicle is driving normally with no noticeable deformation, the third weight can be set to 0.1. If the front of the vehicle is severely dented after a collision, with a deformation greater than 0.15 meters, the third weight can be increased to 0.7.
[0039] The first azimuth angle combination is a parameter combination of the field of view azimuth angle, the centerline azimuth angle, and the vehicle deformation profile determined based on the real-time dynamic parameters, and is used to calculate the initial viewpoint reference point in the current state. For example, when the real-time dynamic parameter is the driving acceleration , turning curvature When the body roll angle is 5°, the corresponding first azimuth angle combination can be: field of view azimuth angle -15°, centerline azimuth angle 10°, and no dent in the front of the vehicle. Based on the pre-established real-time dynamic parameter-azimuth angle / deformation profile association table, such as steering curvature Corresponding to the centerline azimuth angle of 10°, the body roll angle of 5° corresponds to the field of view azimuth angle of -15°; each frame matches the corresponding parameters from the association table based on the real-time dynamic parameters, and integrates them to form the first azimuth angle combination.
[0040] The first initial point is the viewpoint's initial reference point, derived from the first azimuth angle combination and geometric calculations. It serves as the basis for subsequent viewpoint range determination. For example, after calculating the geometric relationships corresponding to the first azimuth angle combination, the coordinates of the first initial point in the scene coordinate system might be (120.6, 1.3, 350.3), where Y=1.3 indicates that the reference point is 1.3 meters above the ground. Specifically, the first, second, and third vertical lines are calculated using the field of view azimuth, centerline azimuth, and vehicle deformation profile in the first azimuth angle combination. The intersection of these three vertical lines is then calculated, combined with the preset cockpit reference coordinates based on the target vehicle's model parameters, to calculate the first initial point through vector superposition. The first initial point = the intersection of the vertical lines + the cockpit reference coordinate offset. The offset is preset based on the vehicle model; for example, a sports car might be set to (0, 0.2, 0).
[0041] The second azimuth angle combination is a parameter combination of the field of view azimuth angle, the centerline azimuth angle, and the vehicle deformation profile determined based on the predicted next instantaneous parameter, which is used to predict the viewpoint reference direction in a short time. For example, the next instantaneous parameter predicted is the driving acceleration , turning curvature , when the body roll angle is 7°, the corresponding second azimuth angle combination can be a field of view azimuth angle of -20°, a centerline azimuth angle of 15°, and a slight depression of 0.05 meters in the front of the vehicle.
[0042] The second initial point is the viewpoint prediction reference point derived from the second azimuth angle combination and geometric calculations. Together with the first initial point, it forms the boundary of the viewpoint range. For example, after geometric calculations corresponding to the second azimuth angle combination, the coordinates of the second initial point may be (120.7, 1.35, 350.4), slightly offset from the first initial point (120.6, 1.3, 350.3). First, based on the field of view azimuth, centerline azimuth, and vehicle deformation profile in the second azimuth angle combination, the corresponding first, second, and third vertical lines are calculated. The intersection of these three vertical lines is then calculated and the preset cockpit reference coordinate offset is added to determine the second initial point. This ensures that the calculation method is consistent with the first initial point and avoids errors caused by methodological differences.
[0043] The first vertical line is a line perpendicular to the direction corresponding to the field of view azimuth. In 3D space, it's a vertical line parallel to the Y-axis of the scene coordinate system and is used to locate the geometric boundary of the field of view. For example, if the field of view azimuth is -15° (15° to the left), the corresponding field of view vector is (sin(-15°), 0, cos(-15°)). The first vertical line is a vertical line perpendicular to this vector, appearing in the scene as a line along the Y-axis and perpendicular to the player's left-facing field of view. In a Cartesian coordinate system, the field of view vector (X1, 0, Z1) is first calculated based on the field of view azimuth. The direction vector of the first vertical line is then determined to be (-Z1, 0, X1, 0), which is guaranteed to be perpendicular to the field of view vector. The first vertical line is then positioned through the horizontal projection of the driving position. For example, the projection of the driving position (120.5, 0.8, 350.2) is (120.5, 0, 350.2). The specific position of the first vertical line is then determined using the equation of the line.
[0044] The second vertical line is a line perpendicular to the direction corresponding to the centerline azimuth and parallel to the Y-axis. It is used to locate the geometric boundary of the vehicle's travel direction. For example, if the centerline azimuth is 10° (meaning the vehicle's nose is 10° to the right of the vehicle's forward direction), the corresponding travel direction vector is (sin10°, 0, cos10°). The second vertical line is a vertical line perpendicular to this vector and passes through the horizontal projection of the travel position. First, the travel direction vector (X2, 0, Z2) is determined based on the centerline azimuth. Then, the direction vector of the second vertical line is determined to be (-Z2, 0, X2, 0). Combined with the horizontal projection of the travel position, the specific position of the second vertical line is determined using the linear equation.
[0045] The third vertical line is a line perpendicular to the reference plane corresponding to the vehicle's deformed profile and parallel to the Y-axis. It is used to correct for geometric offsets caused by vehicle deformation. For example, if the left side of the vehicle's front is dented by 0.05 meters, the deformation reference plane is the undeformed front face of the vehicle. In this case, the third vertical line is a vertical line perpendicular to this reference plane, and its horizontal projection through the center of the deformed area, such as the center of the dented area, is (120.4, 0, 350.1). First, establish a reference plane model for the undeformed vehicle, for example, setting the front face of the vehicle as a plane perpendicular to the Z-axis. Then, calculate the normal vector (X3, Y3, Z3) of the deformed reference plane based on the vehicle's deformed profile. Since the third vertical line is parallel to the Y-axis, its direction vector is set to (0, 1, 0). Finally, let the third vertical line pass through the horizontal projection point of the center of the deformed area, and determine its specific position using the straight line equation.
[0046] Vehicle parameters are inherent attributes of the target vehicle, reflecting its physical dimensions and structural features. Core parameters include cockpit position, wheelbase, and vehicle height, and are used to call preset cockpit reference coordinates. A separate vehicle parameter configuration file, containing key data such as cockpit position, wheelbase, and vehicle height, is stored in the vehicle resource package. Once the target vehicle is identified, the corresponding configuration file is called using the vehicle ID to retrieve the required vehicle parameters.
[0047] The preset cockpit reference coordinates are the standard coordinates for the player's virtual eyes in the cockpit, based on the vehicle's parameters. They serve as the core reference for initial point calculations. The vehicle's own coordinate system, with its origin set at the vehicle's center of gravity, is used as the reference. The vehicle's own coordinate system is then converted to the scene coordinate system using the rotation and translation matrices of the vehicle's driving position, ensuring alignment with the 3D game scene space.
[0048] The viewpoint range is a region in 3D space bounded by the first and second initial points. This range encompasses all possible viewpoint candidate locations and serves as the basis for subsequent indentation processing. For example, if the coordinates of the first initial point are (120.6, 1.3, 350.3) and the coordinates of the second initial point are (120.7, 1.35, 350.4), the viewpoint range is a rectangular region with these two points as diagonal vertices, with the X-axis range from 120.6 to 120.7, the Y-axis range from 1.3 to 1.35, and the Z-axis range from 350.3 to 350.4. The maximum and minimum values of the first and second initial points along the X, Y, and Z axes are calculated to determine the boundaries of the rectangular region. The viewpoint range is then stored using the axis-aligned bounding box algorithm, which allows for rapid subsequent range calculation and adjustment, improving processing efficiency.
[0049] Indentation is the process of scaling down or offsetting the X, Y, and Z axis boundaries of the viewpoint range based on the first, second, and third weights. The goal is to select the optimal viewpoint position within the viewpoint range. The larger the weight, the greater the indentation in the corresponding direction. First, a weight-indentation ratio relationship is established, and the weight value is directly used as the indentation ratio. Then, the range boundaries of each axis are calculated separately: the new left boundary = the original left boundary + (original right boundary - original left boundary) × (indentation ratio / 2), and the new right boundary = the original right boundary - (original right boundary - original left boundary) × (indentation ratio / 2). During the calculation process, it is necessary to ensure that the indented range remains valid, that is, the new left boundary is less than the new right boundary, to avoid boundary overlap.
[0050] The 3D coordinates of the viewpoint are the final spatial coordinates of the player's virtual eye within the adjusted viewpoint range after indentation. These coordinates serve as the observation origin for subsequent scene rendering. First, the geometric center of the indented viewpoint range is calculated. The coordinates along the three axes are averaged from the left and right edges of the corresponding range. The center point is then fine-tuned based on scene obstacle data. Finally, the final 3D coordinates are synchronized to the game engine's camera component as the first-person camera position, ensuring that subsequent rendering is based on this viewpoint.
[0051] The beneficial effects of the above technical solution are: through the full-process design of real-time dynamic parameter collection, next instantaneous parameter prediction, multi-dimensional weight allocation, geometric initial point calculation, and range indentation optimization, a deep binding of the three-dimensional coordinates of the viewpoint and the dynamic state of the vehicle is achieved, which effectively solves the problem of the viewpoint being fixed and disconnected from the actual state of the vehicle in the traditional 3D game vehicle driving engine. By combining quantized weights with geometric calculations, the accuracy and stability of the viewpoint coordinates are ensured, laying the foundation for subsequent high-quality driving rendering from the source.
[0052] The present invention provides a driving engine design method based on a 3D game vehicle, which sequentially determines the static rendering vector of each first rendering point in the standard visualization range under each behavior operation in the behavior operation list, including: Taking each viewpoint as a reference and rotating it by 0.1°, a rotation region set corresponding to the viewpoint is obtained, and each region point in each rotation region of the rotation region set is regarded as a scene point; Classify the first presentation point within the standard visualization range into different types to obtain a presentation point type set including road surface type, vegetation type, building type, and dynamic object type, and configure a basic static attribute vector for each type of presentation point; A static rendering vector is generated for each first rendering point based on a preset association influence weight between each behavioral operation and the rendering point type in the behavioral operation list, a field of view weight coefficient of the first rendering point based on each behavioral operation, and a basic static attribute vector corresponding to the rendering point type, wherein the static rendering vector includes a color channel value, a texture mapping coordinate, and a transparency parameter.
[0053] In this embodiment, the 0.1° rotation is based on the viewpoint as the vertex, and rotates around the vertical or horizontal axis of the scene at an angle interval of 0.1° per step to form a continuous angle coverage range, which is used to finely divide the visible area of the viewpoint. For example, rotating from -60° to +60° around the vertical axis, a new angle direction is generated every time 0.1° is rotated, and a total of 1200 steps are required. Here, the 0.1° setting is the initial vertex of the complete field of view area, and the subsequent 0.03° setting is based on coarse screening to finely divide the area within the standard visualization range. It avoids both the lack of accuracy caused by the coarse granularity of the entire process and the overload of computing power caused by the fine granularity of the entire process, and perfectly adapts to the core requirements of 3D game vehicle driving scenes that require both smooth operation and natural vision.
[0054] The rotation region set consists of all independent regions formed after a 0.1° rotation. Each independent region is a sector or cone region with the viewpoint as the vertex and a corresponding angle range, covering the entire visible range of the viewpoint. Using a frustum discretization algorithm, the direction vector corresponding to each rotation angle is used as the central axis of the frustum, and fixed region depth and horizontal / vertical angles are set to generate independent 3D regions. All independent regions are then integrated to form a rotation region set, storing the spatial boundary coordinates of each region.
[0055] A region point refers to the minimum spatial coordinate point contained in each rotation region and is the constituent unit of the rotation region. A scene point directly defines each region point in the rotation region as a scene point.
[0056] The standard visualization range refers to the 3D space range actually visible to the player, defined by the view frustum clipping algorithm based on the viewpoint. It is usually defined by the horizontal field of view angle, vertical field of view angle, near clipping plane, and far clipping plane. For example, in an off-road game scene, the standard visualization range of the viewpoint is: horizontal 120°, vertical 90°, near clipping 0.1 meter, and far clipping 800 meters. The road surface, trees, and rocks within this range are all visible elements, while the distant mountains outside the range are not rendered for the time being. In the game engine, the standard visualization range is configured through the field of view angle, near clipping plane, and far clipping plane parameters of the Camera component; then, through the engine's built-in view frustum clipping interface, scene points within this range are filtered in real time, and scene points outside the range are excluded to optimize computing power.
[0057] The first rendering point is the smallest visual unit to be rendered, selected from scene points within the standard visualization range. This can correspond to a fragment of an object in the scene, such as a patch of asphalt on the road, a brick on a wall, a vertex of a model, such as a leaf or a headlight, or pixel-level coordinates. It is the direct target of subsequent static and dynamic rendering vector calculations. For example, within the standard visualization range, the coordinates of an asphalt patch on the road (125.3, 0.8, 355.1) and the coordinates of a leaf (126.2, 1.5, 354.8) are both first rendering points.
[0058] The rendering point type set is a collection of all first rendering points categorized by the scene object they belong to. The core categories include road surface, vegetation, buildings, and dynamic objects. Each category corresponds to a group of first rendering points with similar visual attributes. During the game scene creation phase, a type label is added to each object model, such as a road surface model or a tree model. When a first rendering point is generated, it inherits the type label of the object model to which it belongs and is automatically classified into the corresponding type. This ultimately forms the rendering point type set.
[0059] The basic static attribute vector is a pre-set set of basic visual attribute data for each type of rendering point. It reflects the inherent visual characteristics of that rendering point when unaffected by any player manipulation. Its core parameters include basic color, basic texture coordinates, and basic transparency, stored as vectors (basic RGB, basic texture UV, basic transparency). In the game resource management system, a basic attribute configuration table is created for each type of rendering point, associating corresponding vector parameters by type label. Parameter values are set by the artist based on the scene style, and the engine's shader system binds these vector parameters to the model material to ensure consistency in the basic visual effect.
[0060] The preset association influence weight is a coefficient that determines the degree of influence of a pre-set single action on the visual attributes of a certain type of presentation point. It ranges from 0 to 1. The larger the weight, the more significant the visual change caused by the action. It is used to quantify the strength of the association between the action and the presentation point type. For example, the association influence weight of turning on the low beam is set to 0.8 for road surface presentation points and 0.3 for vegetation presentation points; the weight of turning on the wipers is set to 0.9 for windshield presentation points and 0 for road surface presentation points. Based on a pre-established three-dimensional association matrix of action, type, and weight, the row dimension is the action, the column dimension is the presentation point type, and the cell value is the association influence weight.
[0061] The static rendering vector is the final static visual attribute data set for the first rendering point, calculated by combining the preset correlation influence weight, the field of view weight coefficient, and the basic static attribute vector. The color channel value is a parameter in the static rendering vector that describes the color of the rendering point. It is usually represented by three RGB channels. Some scenes also include an alpha channel, whose value is the base color × (1 + correlation influence weight × field of view weight coefficient). For example, if the base RGB of a road rendering point is (100, 100, 100), the correlation influence weight for turning on the low beam is 0.8, and the field of view weight coefficient is 1.0, the final color channel value is: {100 × (1 + 0.8 × 1.0), 100 × (1 + 0.8 × 1.0), 100 × (1 + 0.8 × 1.0)) = (180, 180, 180), which corresponds to the bright gray color of the road surface after being illuminated by light.
[0062] Texture mapping coordinates are parameters in the static rendering vector that describe the position of the texture map corresponding to the rendering point. They are usually expressed as UV coordinates, where U represents the horizontal position of the texture and V represents the vertical position. Their value is: the base texture UV + the UV offset associated with the operation. For example, if the base texture UV of a vegetation rendering point is (0.2, 0.7), the texture mapping coordinates remain at (0.2, 0.7) when no operation is performed, corresponding to the center of the leaf texture map. However, if an operation is performed to associate the vegetation with wind, the associated influence weight is 0.3, and the UV offset is set to (0.02 × 0.3, 0) = (0.006, 0). The final texture mapping coordinates are (0.2 + 0.006, 0.7) = (0.206, 0.7), simulating the texture effect of slightly offset leaves.
[0063] The transparency parameter describes the degree of transparency of the rendering point in the static rendering vector. Its value ranges from 0 to 1, with 0 being completely transparent and 1 being completely opaque. Its value is: base transparency × (1 - associated influence weight × field of view weight coefficient). If the operation makes the rendering point more transparent, the weight is positive; if it makes it more opaque, the weight is negative. For example, if the base transparency of the windshield rendering point is 0.7, the associated influence weight of turning on the wipers is 0.9, and the field of view weight coefficient is 0.8, the final transparency parameter is 0.7 × (1 + 0.9 × 0.8) = 1.204. Due to range constraints, it is set to 1.0 (completely opaque) to simulate the clear effect of the windshield wipers.
[0064] The beneficial effects of this technical solution are as follows: by generating a rotational region set with a 0.1° rotation, it ensures comprehensive coverage of scene points and accurate field of view positions, avoiding visual omissions caused by traditional extensive divisions; configuring basic static attribute vectors by type, making the visual characteristics of different scene elements more consistent with their real-world attributes, reducing the sense of incongruity of a uniform configuration; and combining operation-related weights with field of view weights, allowing static rendering vectors to respond to player operations and adapt to field of view positions in real time. While enhancing the realism of 3D game vehicle driving scenes, it effectively optimizes the allocation of rendering computing power, balancing user experience and performance.
[0065] The present invention provides a driving engine design method based on a 3D game vehicle, which determines a field of view weight coefficient of a first presentation point based on each behavioral operation, including: Determining a dynamic attenuation reference value of the field of view based on the real-time dynamic parameters and the real-time torque, wherein the absolute value of the driving acceleration is negatively correlated with the reference value, the steering curvature is negatively correlated with the attenuation gradient of the reference value along the steering direction, and the vehicle body roll angle is negatively correlated with the reference value; Performing saliency classification on the first presentation point within the standard visualization range, wherein the saliency classification is based on the spatial angle between the presentation point and the driving path, the collision risk coefficient of the presentation point, and the texture complexity of the presentation point, to obtain a set of high-saliency presentation points, a set of medium-saliency presentation points, and a set of low-saliency presentation points; With the viewpoint as the origin, radial grid lines with an interval of 0.03° are established along the polar coordinate angle. A layered height grid surface is established along the depth direction of the field of view to form a three-dimensional grid. The grid cells where the different saliency presentation point sets are located are subjected to corresponding attenuation processing. An intersection operation is performed on the attenuated grid and the boundary of the rotation area, and an edge compensation factor is activated for the grid cells in the boundary transition area. Finally, a field of view weight coefficient is generated for each first presentation point in the standard visualization range, where the edge compensation factor is related to the square of the speed of the target vehicle and the relative influence of the first presentation point based on the corresponding behavioral operation.
[0066] In this embodiment, real-time torque refers to the instantaneous torque value output by the vehicle engine, reflecting the vehicle's power output strength. It is obtained through a preset throttle opening-torque mapping relationship. For example, an 80% throttle opening corresponds to a torque of 400 N·m, and is associated with the player's throttle operation output data in real time.
[0067] The dynamic attenuation baseline value of the visual field is used to control the basic value of the visual attenuation degree of the presentation point within the standard visualization range. It is the core reference benchmark for subsequent attenuation processing. Specifically, it is implemented based on the multivariate function model of the established real-time dynamic parameters, real-time torque and baseline values. The baseline value = ((0.5-0.1 Normalization coefficient of driving acceleration) + (0.3-0.02 Normalization coefficient of turning curvature) + (0.2-0.01 Normalization coefficient of vehicle body roll angle) + 0.001 The normalization coefficient of the real-time torque ensures that the reference value changes dynamically with the vehicle status.
[0068] Salience grading is the process of classifying the first presentation point into different levels based on its importance to the player's driving decision-making. A higher level indicates a higher visual priority. A multi-factor weighted scoring model is established, scoring each first presentation point based on pre-defined criteria. Assuming a total score of 10, scores of 8-10 indicate high salience, 4-7 indicate medium salience, and 0-3 indicate low salience.
[0069] The spatial angle between the presentation point and the driving path is the horizontal angle of the first presentation point relative to the vehicle's current driving path. The smaller the angle, the higher the significance. For example, a road presentation point 5° in front has a spatial angle of 5°; a guardrail presentation point 90° to the side has a spatial angle of 90°. Through vector calculation, the angle between the driving path direction vector and the vector pointing from the presentation point to the viewpoint is the spatial angle, that is: .
[0070] The collision risk coefficient of the presentation point is the probability that the object corresponding to the first presentation point, such as other vehicles or roadblocks, will collide with the target vehicle. The value range is 0 to 1. The higher the risk, the higher the significance. , where the safety distance is dynamically adjusted according to the vehicle speed. The faster the speed, the greater the safety distance.
[0071] The texture complexity of a rendering point is the richness of texture details on the surface of the object where the first rendering point is located. It ranges from 0 to 1 and is calculated using a texture analysis algorithm. The ratio of the RGB difference between adjacent pixels in the texture map corresponding to the rendering point that exceeds the threshold is counted. The higher the ratio, the higher the texture complexity.
[0072] The high-saliency presentation point set is the presentation point set with the highest score in the saliency classification, which usually includes presentation points with a spatial angle of less than 30°, a collision risk coefficient of more than 0.6, and a texture complexity of more than 0.7.
[0073] The medium-saliency presentation point set is a set of presentation points with medium scores, which usually includes presentation points with the following scores: 30°≤spatial angle≤60°, 0.3≤collision risk coefficient≤0.6, and 0.3≤texture complexity≤0.7.
[0074] The low-saliency presentation point set is the set of presentation points with the lowest score, which usually includes presentation points with a spatial angle greater than 60°, a collision risk coefficient less than 0.3, and a texture complexity less than 0.3.
[0075] Polar coordinate angles are coordinate system angle parameters that use angles and distances on the horizontal plane to describe spatial positions, with the viewpoint as the origin.
[0076] Radial grid lines are rays drawn at fixed intervals along polar coordinate angles starting from the viewpoint. They are used to divide the field of view horizontally. Every two adjacent radial grid lines form an angular interval of 0.03°.
[0077] The layered height grid is a horizontal plane perpendicular to the Y axis, set at fixed 5-meter intervals along the depth of the field of view. It is used to vertically divide the field of view, with each plane representing a height layer. Sampling points are set in the polar coordinate r direction. At each sampling point, a horizontal plane with Z=r is generated, where Z is the depth coordinate and the plane height covers the vertical range of the scene, for example, Y=-10m to Y=100m.
[0078] The 3D grid is formed by the intersection of radial grid lines divided by horizontal angles and layered height grid surfaces divided by vertical depth. Each grid cell is a small cube with a size of 0.03°, 5 meters in depth, and a height range. It is used to accurately locate the field of view of the first presentation point. The game engine's spatial partitioning function connects the intersection points of the radial grid lines and the layered height grid surfaces to generate grid cells, storing the boundary coordinates of each cell.
[0079] The grid unit is the smallest indivisible 3D unit in the three-dimensional grid and is the basic unit of attenuation processing. Each unit contains several first rendering points.
[0080] Attenuation applies visual attenuation to the grid cells containing the first rendered point based on the saliency set it belongs to. Grid cells in high-saliency sets experience weaker attenuation, while those in low-saliency sets experience stronger attenuation. The attenuation coefficient is calculated as 1 - (saliency level weight × field of view dynamic attenuation baseline), with high, medium, and low saliency weights set to 0.9, 0.6, and 0.3, respectively. The attenuation coefficient is applied during rendering via the shader, for example, final brightness = base brightness × (1 - attenuation coefficient).
[0081] The intersection operation is a mathematical operation that calculates the overlapping part of the boundary between the attenuated three-dimensional grid and the previously described rotation region set. The purpose is to screen out valid grid cells that are both within the three-dimensional grid and within the rotation region.
[0082] The boundary transition zone refers to the grid cell area located near the boundary of the rotation area after the intersection operation. These cells are in the transition zone between fully visible and completely invisible, and require special processing to avoid visual mutations.
[0083] The edge compensation factor is used to adjust the parameters of the visual effect of the grid unit in the boundary transition area. The value range is 0 to 1. It compensates for the visual mutation caused by boundary division and makes the transition more natural. The higher the factor value, the stronger the compensation.
[0084] The field of view weight coefficient is the final weight coefficient generated for each first presentation point after comprehensive attenuation processing, intersection operation, and edge compensation, and its value range is 0 to 1.
[0085] The relative influence relationship of the first presentation point based on the corresponding behavioral operation is the comparative relationship between the degree to which the first presentation point is affected by an operation in the behavioral operation list and other presentation points. The value range is 0 to 1. An operation-presentation point type-relative influence mapping table is established, and the relative influence value is multiplied by the edge compensation factor to achieve dynamic adjustment of the operation to compensation.
[0086] The beneficial effects of the above technical solution are: through four-level processing of associating vehicle motion status with dynamic benchmark values, focusing on key scene elements through saliency grading, achieving refined attenuation with three-dimensional grids, and optimizing boundary transitions through edge compensation, the generated field of view weight coefficient can accurately adapt to the real-time status of the vehicle and the importance of the presentation point, so that the field of view effect of the 3D game vehicle driving scene not only conforms to the visual focus logic of real driving, but also optimizes rendering performance, achieving a balance between experience and efficiency.
[0087] The present invention provides a driving engine design method based on a 3D game vehicle, which activates an edge compensation factor for a grid cell in a boundary transition zone, comprising: The grid cells in the boundary transition area are divided into subgrids and parent grids according to their spatial relationship with the target vehicle and the standard visualization range; Based on the square of the vehicle's instantaneous speed and the steering angular velocity direction correction coefficient, the first compensation factor corresponding to the parent grid is calculated; If the intersection-over-union ratio of the corresponding subgrid with its parent grid is 1, the second compensation factor of the corresponding subgrid is calculated based on the first compensation factor; If the intersection-and-union ratio of the corresponding subgrid with the multiple parent grids is greater than 0, a third compensation factor of the corresponding subgrid is calculated based on the first compensation factor and the average of the intersection-and-union ratios with the multiple parent grids; The dynamic compensation factors of all subgrids and parent grids involved in the grid cells in the boundary transition zone are weighted superimposed, and the edge compensation factor is obtained by combining the relative influence of the current behavior operation on the vehicle state.
[0088] In this embodiment, a coordinate point set G of the attenuation grid unit and a coordinate point set R of the rotation region corresponding to the attenuation grid unit are defined, and an intersection-over-union ratio 10g is determined, and ,in, is the volume of the spatial intersection of G and R; min(V(G),V(R)) is the smaller volume of V(G) and V(R); When IOg=1, it is determined that the attenuation grid unit is completely within the corresponding rotation area and no compensation is required; Otherwise, it is determined that the attenuation grid unit is in a boundary transition area and needs to be compensated.
[0089] The first compensation factor Bc1 is calculated as follows: ; Among them, α1 is the steering angular velocity direction correction coefficient; β1 is the importance level weight of the scene content; The second compensation factor Bc2 is calculated as follows: ; The third compensation factor Bc3 is calculated as follows: ; Wherein, IOa is the average value of the intersection-over-union ratio with multiple parent grids; The calculation of the edge compensation factor is based on the weighted superposition of the compensation factors of the sub-grids and parent grid involved in the corresponding transition zone grid and multiplied by the behavior operation correction coefficient with the relative impact of the current behavior operation on the vehicle state.
[0090] In this embodiment, the spatial relationship with the target vehicle and the standard visualization range is the core basis for dividing parent and child grids. Specifically, it refers to the straight-line distance between the grid cell and the target vehicle. That is, the closer the distance, the higher the level, and the priority is for the parent grid. The position of the grid cell within the standard visualization range, that is, the closer to the center of the visual range, the more likely it is to be the parent grid. Based on the pre-established distance-level mapping rules, the distance <20 meters is the parent grid level, and the distance 20 meters ≤ <50 meters is the child grid level. Combined with the angle of the grid cell in the visual range, the distance <30° from the center is the parent grid candidate, and the parent and child grids are automatically determined and divided.
[0091] The parent grid is a higher-level, visually prioritized grid cell within the boundary transition zone and serves as the baseline for the child grid. The child grid is a lower-level grid cell within the boundary transition zone that is dependent on the parent grid. It is typically located farther from the vehicle and closer to the edge of the visible range. Its size can be the same as or smaller than the parent grid, and it serves to refine the compensation effect within the parent grid area. After the parent grid is divided, the grid cells surrounding the parent grid are marked as their corresponding child grids. A parent grid ID-child grid ID association table is established to ensure unique parent-child correspondence.
[0092] The angular velocity direction correction coefficient is obtained based on a pre-established mapping table of steering direction-steering angular velocity-correction coefficient, and can be directly matched.
[0093] The importance level weight of the scene content is obtained based on a pre-established presentation point type-importance weight mapping table and can be directly matched.
[0094] The beneficial effects of this technical solution are: through hierarchical parent-child grid division, dynamic multi-parameter calculation of compensation factors, and behavioral manipulation linkage correction logic, the edge compensation factor is deeply tied to the vehicle's instantaneous state, spatial overlap, and player operation. Parent-child grid division solves the problem of hierarchical refinement in boundary transition zones, avoiding the roughness of single-grid compensation. Speed squared and steering correction coefficients adapt compensation to driving dynamics. Intersection-to-Union ratio determination ensures compensation only applies to true transition zones, reducing ineffective calculations. Behavioral manipulation correction allows compensation to interact with the player. This enhances the visual immersion and smoothness of 3D game vehicle driving.
[0095] The present invention provides a method for designing a driving engine for a 3D game vehicle, which determines a dynamic rendering vector corresponding to the first rendering point in each combination of dynamically associated components based on a list of dynamically associated components of the first rendering point, including: Performing hierarchical weight sorting on a list of dynamically associated components of the first rendering point, the dynamically associated components including: a physical collision component, a light and shadow projection component, a particle effect component, and a material deformation component, the hierarchical weight sorting being determined based on the strength of the component's impact on the visual change of the rendering point; Construct a component interaction coefficient matrix, where the matrix element values represent the synergistic influence coefficients when different types of dynamically associated components are combined; Based on each dynamically associated component combination, an initial dynamic vector is calculated based on the component level weight and the component interaction coefficient matrix, wherein the initial dynamic vector includes a position offset, a rotation angular velocity, and a texture stretch coefficient; Determining the interaction behavior type of the physical collision component based on each combination of the dynamically associated components, and determining the change in the characteristic object before and after the interaction between the physical collision component and the corresponding dynamically associated component combination, to obtain a collision warning index, wherein the interaction behavior type includes: irrelevant interaction type, allowed interaction type, and prohibited interaction type; According to the correlation between the collision warning index and each dynamic element, and in combination with the collision warning index, the initial dynamic vector is corrected to generate a dynamic presentation vector including dynamic change rate and attenuation boundary parameters. The dynamic presentation vector is incrementally updated as the real-time state of the component combination changes.
[0096] In this embodiment, the physical collision component is responsible for detecting collision interactions between the first presentation point and other objects such as vehicles and obstacles, and triggering visual changes after the collision, such as position offset and shape change.
[0097] The light and shadow projection component is a component that controls the light and shadow changes such as brightness and shadow after the first rendering point is illuminated by a light source such as a car light or sunlight.
[0098] The particle effects component is responsible for generating particle effects like dust, water splashes, and falling leaves when specific events such as collisions and wind are triggered at the first rendering point. The material deformation component controls the deformation of the material at the first rendering point, such as stretching, wrinkling, and denting, in response to external forces like pressure and tension.
[0099] Hierarchical weight sorting assigns priority weights to components based on the intensity of the impact of dynamically associated components on the visual changes of the first rendering point. The value range is 0 to 1. For example, the component sorting of road rendering points is: the weight of the physical collision component is 0.4 > the weight of the light and shadow projection group is 0.3 > the weight of the particle effects group is 0.2 > the weight of the material deformation component is 0.1; the sorting of leaf rendering points is: the weight of the particle effects component is 0.35 > the weight of the material deformation component is 0.3 > the weight of the light and shadow projection component is 0.2 > the weight of the physical collision component is 0.15. A rendering point type-component weight comparison table is established, and the weight value is set according to the scene requirements. It is stored in the configuration file, and the component influence is processed according to the weight priority during rendering.
[0100] The intensity of a component's impact on the visual changes of a presentation point is measured by quantifying the magnitude of the visual change at the first presentation point after the component is applied, such as position offset, brightness change rate, and particle count. The greater the change, the higher the impact. For example, after the physical collision component is applied, the position offset of the road presentation point reaches 0.5 meters, which is a high impact; after the light and shadow projection component is applied, the brightness change rate is 20%, which is the second highest impact. Using visual change parameters such as offset and brightness difference thresholds, such as an offset greater than 0.3 meters for high intensity, an impact intensity level is set for each component, which serves as a weighted ranking basis.
[0101] The component interaction coefficient matrix is a two-dimensional matrix constructed with dynamically associated components as rows and columns. The value range of the matrix elements is -1 to 1, which represents the degree of synergistic influence when the row components and column components act in combination. The details are shown in Table 1: Table 1
[0102] A combination of different types of dynamically associated components refers to a combination of two or more different dynamically associated components acting on the first presentation point at the same time, such as a physical collision component and a light and shadow projection component, a particle special effect component and a material deformation component, etc.
[0103] The synergistic impact coefficient is the element value in the component interaction coefficient matrix, which quantifies the synergistic effect of the component combination.
[0104] The initial dynamic vector is calculated for each component combination based on the component-level weights and interaction coefficient matrix. It describes the basic dynamic changes at the first rendering point. It includes three core parameters: position offset, rotational angular velocity, and texture stretch coefficient, reflecting the initial dynamic trend of the component combination. Each parameter is calculated using a formula: for example, position offset is the sum of each component's weight and the corresponding component's individual offset × (1 + synergy coefficient). The individual component offset is provided by the physics engine (e.g., the displacement corresponding to the collision force).
[0105] The position offset is a parameter in the initial dynamic vector that describes the position movement of the first rendering point in 3D space. It includes offset values in the X, Y, and Z directions. A positive value indicates movement along the positive direction of the axis, and a negative value indicates movement along the negative direction of the axis.
[0106] The rotational angular velocity is a parameter in the initial dynamic vector that describes the rotational velocity of the first rendering point around its own axis, including the angular velocity around pitch, yaw, and roll.
[0107] The texture stretch coefficient is a parameter in the initial dynamic vector that describes the degree of surface texture stretching at the first rendering point (unitless, 1 means no stretching, >1 means stretching, <1 means compression), reflecting the texture deformation of the material under the action of force.
[0108] The interaction behavior type refers to the permissibility of the interaction between the physical collision component and other components when they are combined. It is divided into three categories: irrelevant, allowed, and prohibited. It is used to determine whether the collision is reasonable and whether an alert needs to be triggered. For example: Unrelated interaction type: The combination of physical collision components and light and shadow projection components has no direct interaction, such as the combination of collision and lighting.
[0109] Allowed interaction types: Physical collision components combined with particle effects components and material deformation components. Interaction is allowed and is the expected effect, such as collision with water particles, collision with road deformation.
[0110] The prohibited interaction type is the combination of physical collision components with themselves or components that do not conform to physical logic. Interaction is prohibited, such as the combination of a vehicle model and its own collision components, and the collision combination of the road surface and underground soil.
[0111] Obtained based on the pre-established physical collision component-other component-interaction type mapping table.
[0112] The feature object change is the state change of the feature object (such as the road surface or obstacle) at the first presentation point before and after the physical collision component and the corresponding dynamic association component interact. Specifically: ; Where R1 is the feature point vector of the first presentation point before the collision; R2 is the feature point vector of the first presentation point after the collision; X0 is the scaling factor used to convert the radian angle into a basic change value that meets the scene requirements; Bc is the change of the feature object; R1·R2 is the vector dot product.
[0113] The collision warning index is calculated based on the interaction behavior type and the change in feature objects, reflecting the collision risk or degree of abnormality: Index = Interaction type weight × (Feature object change / Maximum allowable change), where the prohibited interaction type weight = 1, the allowed interaction type weight = 0.5, and irrelevant = 0; the maximum allowable change is set by the scenario.
[0114] The correlation refers to the positive or negative influence of the collision warning index on various parameters in the initial dynamic vector, such as position offset, rotation angular velocity, and texture stretching coefficient. A warning index-dynamic element correlation coefficient table is established. For example, when interaction is allowed, the correlation coefficient = 0.5, and when it is prohibited = -1, which is used for correction calculations.
[0115] The dynamic change rate is a parameter in the dynamic presentation vector that describes how quickly the initial dynamic vector parameters change over time. It reflects the sustained intensity of the dynamic effect. The higher the warning index, the greater or smaller the rate.
[0116] The attenuation boundary parameter is a parameter that limits the range of dynamic changes in the dynamic rendering vector, such as the maximum distance of position offset and the maximum angle of rotation, to ensure that the dynamic effect is within a reasonable range and avoid excessive deformation.
[0117] The dynamic presentation vector is the final dynamic parameter vector obtained by correcting the initial dynamic vector by the collision warning index. It includes the dynamic change rate and attenuation boundary parameters, and fully describes the dynamic visual change law of the first presentation point. The corrected parameters = initial parameters × (1 + warning index × correlation coefficient) are calculated, and the dynamic change rate and attenuation boundary parameters are superimposed and stored in the rendering cache.
[0118] The real-time state change of a component combination refers to the real-time change of the action strength of a dynamically associated component combination over time. For example, when a vehicle gradually leaves the road presentation point, the action strength of the physical collision component drops from 100N to 0N.
[0119] Incremental update is a mechanism for gradually adjusting the dynamic rendering vector as the real-time state of the component combination changes, rather than completely recalculating it. The vector parameters are updated only based on the state difference between the current and previous frames. Inter-frame difference calculation is used, and only the state change amount is processed in each frame. The dynamic rendering vector parameters are updated by the difference multiplied by the coefficient.
[0120] The beneficial effects of the above technical solution are: clarifying the impact priority through component weight sorting, quantifying the synergistic effect through the interaction matrix, laying the dynamic foundation through the initial vector, correcting anomalies through collision warning, and adapting the incremental update process to real-time changes. The generated dynamic presentation vector can accurately reflect the real dynamics of the first presentation point under the action of multiple components, so that the dynamic visual effects of the 3D game vehicle driving scene conform to the physical laws and user perception, and enhance the realism of the picture and the interactive immersion.
[0121] The present invention provides a driving engine design method based on a 3D game vehicle, which determines the rendering mode of each first rendering point, including: Determining a visual importance coefficient corresponding to the first presentation point based on the static presentation vector and the dynamic presentation vector, and determining a visual attenuation factor based on a straight-line distance between the first presentation point and the viewpoint, wherein a minimum value of the visual attenuation factor is not less than a set value of a lowest authority among the game permissions; A rendering mode that matches the visual importance coefficient and the visual attenuation factor is matched according to a coefficient-factor-mode comparison table.
[0122] In this embodiment, In this embodiment, the coefficient-factor-mode comparison table is a mapping table of preset visual importance coefficients and visual attenuation factors → rendering modes. The row dimension of the table is the visual importance coefficient classification, such as high: 0.7~1, medium: 0.3~0.7, low: 0~0.3, and the column dimension is the visual attenuation factor classification, such as high: 0.8~1, medium: 0.5~0.8, low: 0~0.5. The cells contain the corresponding rendering modes, such as real-time light and shadow rendering, baked texture rendering, and color mixing rendering, which are used to quickly match the optimal rendering strategy for the rendering point. For example, Table 2: Table 2
[0123] The rendering method is the specific strategy used by the game engine to output the image for the first presentation point. It includes the configuration of rendering resources (such as texture accuracy and lighting calculation mode) and rendering effects (such as motion blur and anti-aliasing). Different methods correspond to different image quality and computing power consumption. They need to be matched based on the visual importance coefficient and attenuation factor to balance the experience and performance.
[0124] In this embodiment, the visual importance coefficient VIC is calculated as follows: ; Among them, R, G, and B represent the color channel values of the three channels; Tc is the texture complexity in the static rendering vector; αn is the normalized value of transparency in the static rendering vector, ranging from 0 to 1, with 0 being completely opaque and 1 being completely transparent; the maximum allowable change rate and maximum boundary range are set by the scene, and the values are different in different scenes. For example, the maximum allowable change rate of road surface deviation is 1m / s, and the maximum boundary of road surface deviation is 1m. Cu is the collision warning index, ranging from 0 to 1.
[0125] The visual attenuation factor (VAF) is calculated as follows: ; Where d is the straight-line distance between the first presentation point and the viewpoint; Dmax is the maximum visible distance of the scene; γ0 is the attenuation power coefficient. When γ0>1, the farther the distance, the faster the attenuation. It is usually set to 2. Ssig is the significance level of the presentation point, with high being 1, medium being 0.5, and low being 0. The maximum speed is obtained according to the scene settings, for example, the maximum speed is 30m / s. Vmin is the setting value of the lowest authority in the game permissions, such as 0.5.
[0126] The beneficial effects of the above technical solution are: the visual importance coefficient quantifies the priority of the presentation point, the visual attenuation factor adapts to the distance clarity, and the comparison table accurately matches the logic of the rendering method, realizing the intelligent allocation of rendering resources. The lower limit constraint of the authority based on the visual attenuation factor ensures that players with the lowest authority can also get a basic clear experience, avoiding visual discontinuities caused by differences in authority.
[0127] The present invention provides a driving engine design system based on 3D game vehicles, such as Figure 2 Shown, including: The point extraction module is used to determine the driving position of the target vehicle in the 3D game scene based on the user permissions of the target vehicle, and extract the scene points to obtain the sub-scene; a coordinate determination module, configured to determine, with the target vehicle as a first perspective, the three-dimensional coordinates of each driving position point of the target vehicle in the sub-scene based on different combinations of field of view azimuths, centerline azimuths, and vehicle deformation profiles; a static vector construction module, configured to sequentially determine, based on a standard visualization range of each viewpoint at the same scene point and a behavioral operation list corresponding to the viewpoint, a static rendering vector for each first rendering point in the standard visualization range under each behavioral operation in the behavioral operation list; a dynamic vector construction module, configured to determine, according to the list of dynamic associated components of the first rendering point, a dynamic rendering vector corresponding to the first rendering point in each combination of dynamic associated components; The mode determination module is used to determine the rendering mode of each first rendering point and perform driving rendering based on the static rendering vector and the dynamic rendering vector, and in combination with the straight-line distance between the first rendering point and the viewpoint and the game authority of the target vehicle.
[0128] The beneficial effects of the above technical solution are: the strong binding of perspective, vehicle deformation and player operation makes the driving experience more realistic; the reduction of invalid rendering based on sub-scene interception and frustum clipping, and the adaptation of different device performance based on permission layering; the combination of static and dynamic vectors covers color, light and shadow, and physical interaction, restoring the real-world operation feedback chain, and creating a highly immersive 3D vehicle driving experience.
[0129] Obviously, those skilled in the art may make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if such changes and modifications fall within the scope of the claims and their equivalents, the present invention is intended to include such changes and modifications.
Claims
1. A driving engine design method based on 3D game vehicles, characterized in that: include: Step 1: Determine the driving location of the target vehicle in the 3D game scene based on the user permissions of the target vehicle, and extract the scene points to obtain the sub-scene; Step 2: Taking the target vehicle as the first perspective, determine the three-dimensional coordinates of each driving position of the target vehicle in the sub-scene based on different combinations of field of view azimuth angles, centerline azimuth angles, and vehicle deformation profiles; Step 3: Based on the standard visualization range of each viewpoint at the same scene point and the behavioral operation list of the corresponding viewpoint, sequentially determine the static rendering vector of each first rendering point in the standard visualization range under each behavioral operation in the behavioral operation list; Step 4: determining the dynamic rendering vector corresponding to the first rendering point in each dynamic associated component combination according to the list of dynamic associated components of the first rendering point; Step 5: Based on the static rendering vector and the dynamic rendering vector, and in combination with the straight-line distance between the first rendering point and the viewpoint and the game authority of the target vehicle, determine the rendering mode of each first rendering point and perform driving rendering.
2. The driving engine design method based on 3D game vehicles according to claim 1, characterized in that: Step 2 includes: Determining real-time dynamic parameters of the target vehicle at a driving position, and predicting next instantaneous parameters based on the real-time dynamic parameters, and determining a first weight based on a field of view azimuth, a second weight based on a centerline azimuth, and a third weight based on a vehicle deformation profile, wherein the real-time dynamic parameters include driving acceleration, steering curvature, and vehicle body roll angle; Determining a first initial point of a first azimuth angle combination based on real-time dynamic parameters, and simultaneously determining a second initial point of a second azimuth angle combination based on predicted next instantaneous parameters, wherein a first vertical line based on the field of view azimuth angle, a second vertical line based on the centerline azimuth angle, and a third vertical line based on the vehicle deformation profile are obtained based on the azimuth angle combination, and corresponding initial points are obtained based on the first vertical line, the second vertical line, the third vertical line, and preset cockpit reference coordinates called based on the vehicle model parameters of the target vehicle; The viewpoint range corresponding to the driving position point is determined according to the first initial point and the second initial point, and the viewpoint range is indented according to the first weight, the second weight and the third weight to obtain the three-dimensional coordinates of the viewpoint.
3. The driving engine design method based on 3D game vehicles according to claim 2, characterized in that: Sequentially determining a static rendering vector of each first rendering point in the standard visualization range under each behavior operation in the behavior operation list, including: Taking each viewpoint as a reference and rotating it by 0.1°, a rotation region set corresponding to the viewpoint is obtained, and each region point in each rotation region of the rotation region set is regarded as a scene point; Classify the first presentation point within the standard visualization range into different types to obtain a presentation point type set including road surface type, vegetation type, building type, and dynamic object type, and configure a basic static attribute vector for each type of presentation point; A static rendering vector is generated for each first rendering point based on a preset association influence weight between each behavioral operation and the rendering point type in the behavioral operation list, a field of view weight coefficient of the first rendering point based on each behavioral operation, and a basic static attribute vector corresponding to the rendering point type, wherein the static rendering vector includes a color channel value, a texture mapping coordinate, and a transparency parameter.
4. The driving engine design method based on 3D game vehicles according to claim 3, characterized in that: Determine the first rendering point based on the field of view weight coefficient of each behavior operation, including: Determining a dynamic attenuation reference value of the field of view based on the real-time dynamic parameters and the real-time torque, wherein the absolute value of the driving acceleration is negatively correlated with the reference value, the steering curvature is negatively correlated with the attenuation gradient of the reference value along the steering direction, and the vehicle body roll angle is negatively correlated with the reference value; Performing saliency classification on the first presentation point within the standard visualization range, wherein the saliency classification is based on the spatial angle between the presentation point and the driving path, the collision risk coefficient of the presentation point, and the texture complexity of the presentation point, to obtain a set of high-saliency presentation points, a set of medium-saliency presentation points, and a set of low-saliency presentation points; With the viewpoint as the origin, radial grid lines with an interval of 0.03° are established along the polar coordinate angle. A layered height grid surface is established along the depth direction of the field of view to form a three-dimensional grid. The grid cells where the different saliency presentation point sets are located are subjected to corresponding attenuation processing. An intersection operation is performed on the attenuated grid and the boundary of the rotation area, and an edge compensation factor is activated for the grid cells in the boundary transition area. Finally, a field of view weight coefficient is generated for each first presentation point in the standard visualization range, where the edge compensation factor is related to the square of the speed of the target vehicle and the relative influence of the first presentation point based on the corresponding behavioral operation.
5. The driving engine design method based on 3D game vehicles according to claim 4 is characterized in that: Enable edge compensation factors for grid cells in the boundary transition area, including: The grid cells in the boundary transition area are divided into subgrids and parent grids according to their spatial relationship with the target vehicle and the standard visualization range; Based on the square of the vehicle's instantaneous speed and the steering angular velocity direction correction coefficient, the first compensation factor corresponding to the parent grid is calculated; If the intersection-over-union ratio of the corresponding subgrid with its parent grid is 1, the second compensation factor of the corresponding subgrid is calculated based on the first compensation factor; If the intersection-and-union ratio of the corresponding subgrid with the multiple parent grids is greater than 0, a third compensation factor of the corresponding subgrid is calculated based on the first compensation factor and the average of the intersection-and-union ratios with the multiple parent grids; The dynamic compensation factors of all subgrids and parent grids involved in the grid cells in the boundary transition zone are weighted superimposed, and the edge compensation factor is obtained by combining the relative influence of the current behavior operation on the vehicle state.
6. The driving engine design method based on 3D game vehicles according to claim 1, characterized in that: Determining, according to the list of dynamically associated components of the first rendering point, a dynamic rendering vector corresponding to the first rendering point in each combination of dynamically associated components, includes: Performing hierarchical weight sorting on a list of dynamically associated components of the first rendering point, the dynamically associated components including: a physical collision component, a light and shadow projection component, a particle effect component, and a material deformation component, the hierarchical weight sorting being determined based on the strength of the component's impact on the visual change of the rendering point; Construct a component interaction coefficient matrix, where the matrix element values represent the synergistic influence coefficients when different types of dynamically associated components are combined; Based on each dynamically associated component combination, an initial dynamic vector is calculated based on the component level weight and the component interaction coefficient matrix, wherein the initial dynamic vector includes a position offset, a rotation angular velocity, and a texture stretch coefficient; Determining the interaction behavior type of the physical collision component based on each combination of the dynamically associated components, and determining the change in the characteristic object before and after the interaction between the physical collision component and the corresponding dynamically associated component combination, to obtain a collision warning index, wherein the interaction behavior type includes: irrelevant interaction type, allowed interaction type, and prohibited interaction type; According to the correlation between the collision warning index and each dynamic element, and in combination with the collision warning index, the initial dynamic vector is corrected to generate a dynamic presentation vector including dynamic change rate and attenuation boundary parameters. The dynamic presentation vector is incrementally updated as the real-time state of the component combination changes.
7. The driving engine design method based on 3D game vehicles according to claim 1, characterized in that: Determines how each first rendering point is rendered, including: Determining a visual importance coefficient corresponding to the first presentation point based on the static presentation vector and the dynamic presentation vector, and determining a visual attenuation factor based on a straight-line distance between the first presentation point and the viewpoint, wherein a minimum value of the visual attenuation factor is not less than a set value of a lowest authority among the game permissions; A rendering mode that matches the visual importance coefficient and the visual attenuation factor is matched according to a coefficient-factor-mode comparison table.
8. A driving engine design system based on 3D game vehicles, characterized in that: include: The point extraction module is used to determine the driving position of the target vehicle in the 3D game scene based on the user permissions of the target vehicle, and extract the scene points to obtain the sub-scene; a coordinate determination module, configured to determine, with the target vehicle as a first perspective, the three-dimensional coordinates of each driving position point of the target vehicle in the sub-scene based on different combinations of field of view azimuths, centerline azimuths, and vehicle deformation profiles; a static vector construction module, configured to sequentially determine, based on a standard visualization range of each viewpoint at the same scene point and a behavioral operation list corresponding to the viewpoint, a static rendering vector for each first rendering point in the standard visualization range under each behavioral operation in the behavioral operation list; a dynamic vector construction module, configured to determine, according to the list of dynamic associated components of the first rendering point, a dynamic rendering vector corresponding to the first rendering point in each combination of dynamic associated components; The mode determination module is used to determine the rendering mode of each first rendering point and perform driving rendering based on the static rendering vector and the dynamic rendering vector, and in combination with the straight-line distance between the first rendering point and the viewpoint and the game authority of the target vehicle.
Citation Information
Patent Citations
Performance test method for game engine
CN117982897A
Electronic game apparatus
JP1995155472A
Drive simulation apparatus, wide-angle camera image simulation apparatus and image deformation combination apparatus
JP2010129063A
Method and system to create three-dimensional mapping in a two-dimensional game
US20120270653A1
Game screen rendering method and apparatus, terminal, and storage medium
US20210225067A1