3D rendering method, system, medium and device based on adaptive multi-resolution texture mapping
Through adaptive multi-resolution texture mapping technology, the problem of performance bottlenecks in complex scenes of traditional 3D rendering methods is solved, and an efficient and seamless rendering experience is achieved, improving the user experience.
Patent Information
- Application Number
- CN202411859245.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-17
- Publication Date
- 2025-04-04
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Traditional 3D rendering methods have performance bottlenecks when dealing with complex scenes, especially under the requirements of real-time rendering, which are prone to texture loading delays and rendering lags, and it is difficult to achieve adaptive adjustments to adapt to texture details of different viewing angles and distances.
Using a 3D rendering method based on adaptive multi-resolution texture mapping, the multi-resolution texture library is pre-constructed, and the distance between the viewpoint and the 3D model is detected in real time, the appropriate texture resolution layer is adaptively selected, and dynamic detail hierarchical interpolation is performed, and efficient rendering is combined with GPU acceleration technology.
It significantly improves rendering efficiency in complex scenarios, avoids texture loading delays and rendering lags, and improves user experience, especially in application scenarios that require real-time rendering.
Smart Images

Figure CN119762654A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer graphics and 3D rendering technology, and in particular to a 3D rendering method, system, medium and device based on adaptive multi-resolution texture mapping. Background Art
[0002] As the image rendering capabilities of computer devices continue to improve, more and more applications that support three-dimensional (3D) scene display have emerged. For example, 3D game applications, augmented reality (AR) applications, virtual reality (VR) applications, and so on. In the 3D rendering process, texture mapping technology is used to add details and realism to the surface of the three-dimensional model. However, traditional texture mapping technology has performance bottlenecks when processing complex scenes, especially under real-time rendering requirements. Under traditional rendering methods, when the viewpoint moves quickly in the scene, texture loading delays and rendering jams often occur. In addition, existing methods are difficult to achieve adaptive adjustments when processing texture details at different viewing angles and distances, resulting in poor overall rendering effects. Summary of the invention
[0003] In view of the above problems, the purpose of the present invention is to provide a 3D rendering method, system, medium and device based on adaptive multi-resolution texture mapping, which realizes efficient and high-quality 3D rendering in complex scenes by introducing a novel adaptive multi-resolution texture mapping algorithm, solves the problem of texture loading delay and rendering jamming that often occurs when the viewpoint moves quickly in the scene under traditional rendering methods, and greatly improves the user experience.
[0004] To achieve the above-mentioned purpose, in a first aspect, the technical solution adopted by the present invention is: for the target 3D model, a multi-resolution texture library is pre-built; the multi-resolution texture library contains multiple layers of texture maps from high resolution to low resolution, and each layer of texture maps corresponds to a different level of detail; the distance between the current viewpoint and the target 3D model is detected in real time, and the appropriate texture resolution layer is adaptively selected according to the distance, and dynamic level of detail interpolation is performed; combined with GPU acceleration technology, the selected texture resolution layer is efficiently rendered.
[0005] Further, dynamic detail level interpolation, including: Using historical viewpoint data, the future movement trajectory of the viewpoint is predicted through time series analysis algorithm; Based on the predicted viewpoint position, the required texture detail level is determined and interpolation is performed between adjacent resolution layers; The most recently used interpolation results are cached. When the viewpoint moves to a position close to the interpolation result, the interpolation result is read directly from the cache to reduce computational overhead.
[0006] Furthermore, the historical viewpoint data is used to predict the future movement trajectory of the viewpoint through a time series analysis algorithm, including: Collect historical viewpoint data of the user in the 3D scene, including the position, direction and timestamp of the viewpoint; Preprocess the collected historical viewpoint data to improve prediction accuracy. The preprocessing includes smoothing filtering, outlier detection and correction. The preprocessed viewpoint data is modeled using a time series analysis algorithm, and the ARIMA model is obtained as a prediction model; Fit the ARIMA model through historical viewpoint data and determine the model parameters by finding the parameter combination that minimizes the sum of squares of the model residuals; After the model fitting is completed, the ARIMA model is used to predict the position and direction of future viewpoints.
[0007] Furthermore, according to the predicted viewpoint position, the required texture detail level is determined, and interpolation calculations are performed between adjacent resolution layers, including: According to the predicted viewpoint position, the required texture detail level is determined by comparing the viewpoint distance with a preset distance threshold; The trilinear interpolation method is used for interpolation calculation. It is assumed that at two adjacent texture resolution layers and Interpolate between them to generate a new texture with an intermediate level of detail; Map the predicted viewpoint texture coordinates to a relatively lower resolution texture resolution layer The first coordinate is obtained in the coordinate system of the predicted viewpoint texture coordinates; the predicted viewpoint texture coordinates are mapped to a relatively high-resolution texture resolution layer In the coordinate system of , the second coordinate is obtained; At two texture resolution levels and Find the eight nearest pixel points of the first coordinate, and the coordinate value of the last pixel point among the eight nearest pixel points is the second coordinate; The coordinates of the eight nearest pixel points are trilinearly interpolated to obtain the pixel value at the predicted value of the predicted viewpoint position.
[0008] Furthermore, during the interpolation process, an error control mechanism is introduced to ensure that the error between the texture detail level generated by interpolation and the actual requirement is within an acceptable range.
[0009] Furthermore, an error control mechanism is introduced to ensure that the error between the texture detail level generated by interpolation and the actual requirement is within an acceptable range, including: The mean square error metric is used to evaluate the difference between the interpolation result and the actual texture. The mean square error is calculated by calculating the average of the squares of the difference between the interpolation result and the actual texture pixel value. According to application requirements and rendering quality goals, an error threshold is set. When the calculated mean square error exceeds the error threshold, an error adjustment strategy is adopted or the texture resolution layer is reselected.
[0010] Furthermore, the error adjustment strategy adopts one of the following two strategies: Adjust interpolation algorithm parameters: In trilinear interpolation, adjust the weights of sampling points to reduce errors:
[0011] in, , , are the pixel values of the three sampling points, and is the adjusted weight; Dynamically adjust texture resolution: select a relatively high-resolution texture resolution layer or a relatively low resolution texture resolution layer Re-interpolation; or, mixed resolution interpolation: combine texture information from multiple resolution layers and generate textures at intermediate detail levels through a hybrid strategy.
[0012] In the second aspect, the technical solution adopted by the present invention is: a 3D rendering system based on adaptive multi-resolution texture mapping, which includes: a texture library construction module, which pre-builds a multi-resolution texture library for the target 3D model; the multi-resolution texture library contains multiple layers of texture maps from high resolution to low resolution, and each layer of texture map corresponds to a different level of detail; a dynamic interpolation module, which detects the distance between the current viewpoint and the target 3D model in real time, and adaptively selects the appropriate texture resolution layer according to the distance, and performs dynamic detail level interpolation; a rendering module, combined with GPU acceleration technology, efficiently renders the selected texture resolution layer.
[0013] In a third aspect, the technical solution adopted by the present invention is: a computer-readable storage medium storing one or more programs, wherein the one or more programs include instructions, and when the instructions are executed by a computing device, the computing device executes any one of the above methods.
[0014] In a fourth aspect, the technical solution adopted by the present invention is: a computing device, comprising: one or more processors, a memory and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs include instructions for executing any of the above methods.
[0015] The present invention adopts the above technical solution, which has the following advantages: The 3D rendering method based on adaptive multi-resolution texture mapping technology of the present invention uses historical viewpoint data to predict the future movement trajectory of the viewpoint through a time series analysis algorithm, and determines the required texture detail level based on the predicted viewpoint position to perform interpolation calculations between adjacent resolution layers. It can significantly improve the rendering efficiency in complex scenes while ensuring the rendering quality, and avoid the phenomenon of texture loading delay and rendering jam. In particular, the practical value of the present invention is particularly prominent in application scenarios that require real-time rendering (such as virtual reality, games, etc.). BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 is a schematic flow chart of a 3D rendering method based on adaptive multi-resolution texture mapping in an embodiment of the present invention; Figure 2 is a flow chart of dynamic level of detail interpolation in an embodiment of the present invention; Figure 3 is a viewpoint prediction flow chart in an embodiment of the present invention; Figure 4 It is a flow chart of interpolation calculation in an embodiment of the present invention. DETAILED DESCRIPTION
[0017] In order to make the purpose, technical solution and advantages of the embodiment of the present invention clearer, the technical solution of the embodiment of the present invention will be clearly and completely described below in conjunction with the drawings of the embodiment of the present invention. Obviously, the described embodiment is a part of the embodiment of the present invention, not all of the embodiments. Based on the described embodiment of the present invention, all other embodiments obtained by ordinary technicians in this field belong to the scope of protection of the present invention.
[0018] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit exemplary embodiments according to the present invention. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprising" and / or "including" are used in this specification, it indicates the presence of features, steps, operations, devices, components and / or combinations thereof.
[0019] In one embodiment of the present invention, a 3D rendering method based on adaptive multi-resolution texture mapping is provided, which can significantly improve the rendering efficiency in complex scenes while ensuring the rendering quality, avoid texture loading delays and rendering freezes, and improve the user experience. Figure 1 As shown, the method comprises the following steps: 1) Pre-build a multi-resolution texture library for the target 3D model; the multi-resolution texture library contains multiple layers of texture maps from high resolution to low resolution, and each layer of texture maps corresponds to a different level of detail; 2) Real-time detection of the distance between the current viewpoint and the target 3D model, adaptive selection of the appropriate texture resolution layer based on the distance, and dynamic detail level interpolation; 3) Combined with GPU acceleration technology, the selected texture resolution layer is rendered efficiently. At the same time, unnecessary rendering operations (such as backface culling, occlusion culling, etc.) are eliminated to further optimize rendering performance.
[0020] In the above step 2), the adaptive selection of viewpoint and distance perception: In this embodiment, an innovative algorithm - Dynamic Level of Detail Interpolation (DLoDI) is used to improve the rendering effect. Specifically, Figure 2 As shown, dynamic detail level interpolation includes the following steps: 2.1) Viewpoint prediction: Using historical viewpoint data, the future movement trajectory of the viewpoint is predicted through a time series analysis algorithm.
[0021] Specifically, Figure 3 As shown, viewpoint prediction includes the following steps: 2.1.1) Data collection: Collect the user’s historical viewpoint data in the 3D scene. The historical viewpoint data includes the viewpoint’s position (x, y, z coordinates), direction (orientation), and timestamp. This data can be obtained through tracking devices in the scene (such as sensors in VR helmets) or user interaction records.
[0022] 2.1.2) Data preprocessing: The collected raw data usually contains noise and outliers. The collected historical viewpoint data is preprocessed to improve the prediction accuracy. The preprocessing includes smoothing filtering, outlier detection and correction.
[0023] Smoothing filtering: Use methods such as moving average or Kalman filtering to smooth the viewpoint data and remove high-frequency noise.
[0024] Outlier detection and correction: Use statistical methods (such as Z-score) to detect and correct outliers.
[0025] 2.1.3) Time series analysis: The time series analysis algorithm is used to model the preprocessed viewpoint data and obtain the ARIMA model (autoregressive integrated moving average model) as the prediction model.
[0026] The ARIMA model is:
[0027] in, is the value of the time series at time t (here is the position or direction of the viewpoint); is the lag operator; and is the model parameter; d is the number of differences, which is used to make the time series stable; p and q are the orders of the autoregressive term and the moving average term, respectively; is a white noise sequence.
[0028] 2.1.4) Model fitting: Fit the ARIMA model with historical viewpoint data and determine the model parameters by finding the parameter combination that minimizes the sum of squares of the model residuals. , , d, p, q.
[0029] 2.1.5) Viewpoint prediction: After the model is fitted, the ARIMA model is used to predict the position and direction of future viewpoints.
[0030] For example, if we want to predict the viewpoint position at the future (T+h)th time ( ), the following formula can be used:
[0031] in, and are estimates of the model parameters.
[0032] Suppose in a virtual museum scene, a user is browsing exhibits. The system has collected the user's viewpoint movement data in the past few minutes through tracking devices (such as sensors in VR helmets) or user interaction records. It is necessary to predict the user's viewpoint position in the next few seconds.
[0033] Data collection: The system records the user's viewpoint position (0, 0, 0) coordinates every second over the past 60 seconds.
[0034] Data preprocessing: smoothing and filtering the collected data and correcting outliers.
[0035] Time series analysis: By trying different parameter combinations, the order of the ARIMA model is determined to be (p=2) and (q=1), and the number of differences (d=1).
[0036] Use historical data to fit the ARIMA model and obtain the model parameters ( , , ).
[0037] Viewpoint prediction: Assuming the current time is the 60th second, and you want to predict the viewpoint position at the 61st second, using the fitted ARIMA model, you can calculate the viewpoint position prediction values at the 61st second as (0.8, 0.7, 0.6).
[0038] In this way, the system can prepare the required texture detail levels in advance, enabling a seamless and efficient rendering experience when the user actually moves to the corresponding location.
[0039] 2.2) According to the predicted viewpoint position, the required texture detail level is determined, and interpolation calculations are performed between adjacent resolution layers; in this embodiment, a trilinear interpolation method is used (trilinear interpolation is a method for interpolation in a three-dimensional texture space, suitable for 3D texture mapping) to calculate the texture coordinates of the intermediate detail level in the texture space.
[0040] Specifically, Figure 4 As shown, the interpolation calculation includes the following steps: 2.2.1) Determine the texture detail level: Based on the predicted viewpoint position, the required texture detail level is determined by comparing the viewpoint distance with a preset distance threshold; this is usually achieved by comparing the viewpoint distance with a preset distance threshold. For example, if the viewpoint is far from the model, the system will select a lower resolution texture layer; if the viewpoint is close, a higher resolution texture layer will be selected.
[0041] 2.2.2) Use trilinear interpolation method for interpolation calculation, assuming that at two adjacent texture resolution layers and Interpolate between them to generate a new texture with an intermediate level of detail; 2.2.3) Texture coordinate mapping: Map the predicted viewpoint texture coordinates Mapping to a relatively low-resolution texture resolution layer In the coordinate system of ; The predicted viewpoint texture coordinates Mapped to a relatively high resolution texture resolution layer In the coordinate system of ; 2.2.4) At two texture resolution levels and Find the first coordinate between The eight nearest pixels , and determine the coordinates of the eight nearest pixels , , , , , , , , the coordinate value of the last pixel among the eight nearest pixels is the second coordinate .
[0042] 2.2.5) Perform trilinear interpolation on the coordinates of the eight nearest pixels to obtain the predicted value at the predicted viewpoint position The pixel value at .
[0043]
[0044] in, , , .
[0045] Assume that the user is browsing the exhibits in the virtual museum scene as above. The system has predicted the viewpoint position prediction values for 61 seconds as (0.8, 0.7, 0.6) and determined the two adjacent texture resolution layers required. and , and then use the trilinear interpolation method to generate a new texture at an intermediate level of detail: Assuming that at the lower resolution layer In the image, the texture coordinates of the user's viewpoint are (0, 0, 0); at higher resolution layers In the resolution layer, the texture coordinates of the user's viewpoint are (1,1,1). and Find the eight closest pixels between (0, 0, 0), ..., (1, 1, 1) ), and use the trilinear interpolation formula above to calculate the pixel value at the predicted viewpoint position (0.8, 0.7, 0.6) at 61 seconds.
[0046] In this way, the system is able to smoothly transition between texture layers of different resolutions and generate textures at intermediate levels of detail, thereby maintaining high-quality rendering effects as the user's viewpoint moves.
[0047] 2.3) To avoid repeated calculations, cache the most recently used interpolation results. When the viewpoint moves to a position close to the interpolation result, read the interpolation result directly from the cache to reduce the computational overhead. In addition, it can also ensure the consistency of the rendered image at the same viewpoint texture coordinates when the user replays or repeatedly views.
[0048] During the interpolation process of step 2.3), an error control mechanism is also introduced.
[0049] 2.4) Introduce an error control mechanism to ensure that the error between the texture detail level generated by interpolation and the actual requirements is within an acceptable range. By adjusting the parameters of the interpolation algorithm, a balance can be found between rendering quality and computational efficiency.
[0050] Specifically, the error control mechanism is introduced, including the following steps: 2.4.1) Error metric: Mean square error The metric is used to evaluate the difference between the interpolation result and the actual texture. The average of the squares of the difference between the interpolation result and the actual texture pixel value is calculated to obtain the mean square error. ; Mean square error for:
[0051] Where N is the total number of pixels, is the pixel value in the interpolation result, is the pixel value in the reference texture.
[0052] 2.4.2) According to the application requirements and rendering quality goals, set an error threshold. When the calculated mean square error exceeds the error threshold, it means that there is a large difference between the interpolation result and the actual requirement, and it is necessary to adopt an error adjustment strategy or reselect the texture resolution layer; If it is smaller than the set threshold, it means that the interpolation result is consistent with the actual demand.
[0053] In this embodiment, the error adjustment strategy adopts one of the following two strategies: (1) Adjust the interpolation algorithm parameters: In trilinear interpolation, the weights of the sampling points are adjusted to reduce the error, using the mean square error As an error measure, an error threshold is set ,if , then the error adjustment strategy is triggered.
[0054] The formula for adjusting the weight of the sampling points to reduce the error is:
[0055] in, , , are the pixel values of the three sampling points, and is the adjusted weight.
[0056] Assuming that the user is browsing the exhibits in the virtual museum scene above, the system has predicted the user's viewpoint position for the next 61 seconds and tried to use a lower resolution texture layer for rendering to improve performance.
[0057] (2) Dynamically adjust texture resolution: select a relatively high-resolution texture resolution layer or a relatively low resolution texture resolution layer Re-interpolation; or, mixed resolution interpolation: combine texture information from multiple resolution layers and generate textures at intermediate detail levels through a hybrid strategy.
[0058] In the above embodiments, we first try to adjust the weight parameters of bilinear interpolation and , to reduce the error. If the error is still too large after adjusting the weight, the system will select a higher resolution texture layer for re-interpolation. In this way, the system can ensure that the interpolated texture detail level meets the visual quality requirements while ensuring rendering efficiency.
[0059] In summary, the present invention combines multiple steps such as multi-resolution texture library construction, adaptive selection of viewpoint and distance perception, dynamic detail level interpolation, and rendering optimization. It can significantly improve the rendering efficiency in complex scenes while ensuring the rendering quality, and avoid texture loading delays and rendering jams.
[0060] Furthermore, the present invention adopts an innovative dynamic detail level interpolation algorithm, which enables the system to smoothly transition between texture layers of different resolutions and generate textures of intermediate detail levels through four steps of viewpoint prediction, interpolation calculation, cache optimization, and error control, thereby maintaining high-quality rendering effects as the user's viewpoint moves.
[0061] Furthermore, the present invention can achieve more efficient adaptive multi-resolution texture mapping in the 3D rendering process by combining the time series analysis algorithm (ARIMA model) for viewpoint prediction after data collection, data preprocessing, and time series analysis. This not only improves rendering efficiency, but also enhances user experience, especially in interactive applications that require real-time response.
[0062] Furthermore, in the interpolation calculation, after determining the texture detail level, by combining the trilinear interpolation method, the present invention can realize efficient adaptive multi-resolution texture mapping in the 3D rendering process. This not only improves the rendering efficiency, but also enhances the user experience, especially in interactive applications that require real-time response.
[0063] Furthermore, during error control, by introducing an error control mechanism in the interpolation process, the present invention can effectively manage and reduce interpolation errors, while continuously and adaptively optimizing the error control formula, thereby achieving higher quality 3D rendering effects in complex scenes.
[0064] In one embodiment of the present invention, a 3D rendering system based on adaptive multi-resolution texture mapping is provided, comprising: The texture library building module pre-builds a multi-resolution texture library for the target 3D model; the multi-resolution texture library contains multiple layers of texture maps from high resolution to low resolution, and each layer of texture maps corresponds to a different level of detail; Dynamic interpolation module detects the distance between the current viewpoint and the target 3D model in real time, adaptively selects the appropriate texture resolution layer according to the distance, and performs dynamic detail level interpolation; The rendering module, combined with GPU acceleration technology, can efficiently render the selected texture resolution layer.
[0065] In the above embodiment, the dynamic detail level interpolation includes: Using historical viewpoint data, the future movement trajectory of the viewpoint is predicted through time series analysis algorithm; Based on the predicted viewpoint position, the required texture detail level is determined and interpolation is performed between adjacent resolution layers; The most recently used interpolation results are cached. When the viewpoint moves to a position close to the interpolation result, the interpolation result is read directly from the cache to reduce computational overhead.
[0066] In the above embodiment, the historical viewpoint data is used to predict the future movement trajectory of the viewpoint through a time series analysis algorithm, including: Collect historical viewpoint data of the user in the 3D scene, including the position, direction and timestamp of the viewpoint; Preprocess the collected historical viewpoint data to improve prediction accuracy. The preprocessing includes smoothing filtering, outlier detection and correction. The preprocessed viewpoint data is modeled using a time series analysis algorithm, and the ARIMA model is obtained as a prediction model; Fit the ARIMA model through historical viewpoint data and determine the model parameters by finding the parameter combination that minimizes the sum of squares of the model residuals; After the model fitting is completed, the ARIMA model is used to predict the position and direction of future viewpoints.
[0067] In the above embodiment, the required texture detail level is determined according to the predicted viewpoint position, and interpolation calculation is performed between adjacent resolution layers, including: According to the predicted viewpoint position, the required texture detail level is determined by comparing the viewpoint distance with a preset distance threshold; The trilinear interpolation method is used for interpolation calculation. It is assumed that at two adjacent texture resolution layers and Interpolate between them to generate a new texture with an intermediate level of detail; Map the predicted viewpoint texture coordinates to a relatively lower resolution texture resolution layer The first coordinate is obtained in the coordinate system of the predicted viewpoint texture coordinates; the predicted viewpoint texture coordinates are mapped to a relatively high-resolution texture resolution layer In the coordinate system of , the second coordinate is obtained; At two texture resolution levels and Find the eight nearest pixel points of the first coordinate, and the coordinate value of the last pixel point among the eight nearest pixel points is the second coordinate; The coordinates of the eight nearest pixel points are trilinearly interpolated to obtain the pixel value at the predicted value of the predicted viewpoint position.
[0068] In the above embodiment, during the interpolation process, an error control mechanism is introduced to ensure that the error between the texture detail level generated by interpolation and the actual requirement is within an acceptable range.
[0069] In this embodiment, an error control mechanism is introduced to ensure that the error between the texture detail level generated by interpolation and the actual requirement is within an acceptable range, including: The mean square error metric is used to evaluate the difference between the interpolation result and the actual texture. The mean square error is calculated by calculating the average of the squares of the difference between the interpolation result and the actual texture pixel value. According to application requirements and rendering quality goals, an error threshold is set. When the calculated mean square error exceeds the error threshold, an error adjustment strategy is adopted or the texture resolution layer is reselected.
[0070] Among them, the error adjustment strategy adopts one of the following two strategies: Adjust interpolation algorithm parameters: In trilinear interpolation, adjust the weights of sampling points to reduce errors:
[0071] in, , , are the pixel values of the three sampling points, and is the adjusted weight; Dynamically adjust texture resolution: select a relatively high-resolution texture resolution layer or a relatively low resolution texture resolution layer Re-interpolation; or, mixed resolution interpolation: combine texture information from multiple resolution layers and generate textures at intermediate detail levels through a hybrid strategy.
[0072] The system provided in this embodiment is used to execute the above-mentioned method embodiments. Please refer to the above-mentioned embodiments for specific processes and detailed contents, which will not be repeated here.
[0073] A computing device provided in one embodiment of the present invention may be a terminal, which may include: a processor, a communications interface, a memory, a display screen, and an input device. The processor, the communications interface, and the memory communicate with each other through a communication bus. The processor is used to provide computing and control capabilities. The memory includes a non-volatile storage medium and an internal memory, wherein the non-volatile storage medium stores an operating system and a computer program, and the computer program is executed by the processor to implement the methods in the above embodiments; the internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner may be implemented through WIFI, a management network, NFC (near field communication) or other technologies. The display screen may be a liquid crystal display screen or an electronic ink display screen, and the input device may be a touch layer covered on the display screen, or a key, trackball or touchpad provided on the housing of the computing device, or an external keyboard, touchpad or mouse, etc. The processor may call the logic instructions in the memory.
[0074] In addition, the logic instructions in the above-mentioned memory can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0075] In one embodiment of the present invention, a computer program product is provided, wherein the computer program product includes a computer program stored on a non-transitory computer-readable storage medium, wherein the computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute the methods provided by the above-mentioned method embodiments.
[0076] In one embodiment of the present invention, a non-transitory computer-readable storage medium is provided, wherein the non-transitory computer-readable storage medium stores server instructions, and the computer instructions enable a computer to execute the methods provided in the above embodiments.
[0077] The above embodiment provides a computer-readable storage medium, whose implementation principle and technical effect are similar to those of the above method embodiment, and will not be repeated here.
[0078] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0079] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0080] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0081] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A 3D rendering method based on adaptive multi-resolution texture mapping, characterized in that: include: A multi-resolution texture library is pre-built for the target 3D model; the multi-resolution texture library contains multiple layers of texture maps from high resolution to low resolution, and each layer of texture maps corresponds to a different level of detail; Real-time detection of the distance between the current viewpoint and the target 3D model, adaptive selection of the appropriate texture resolution layer based on the distance, and dynamic detail level interpolation; Combined with GPU acceleration technology, the selected texture resolution layer can be rendered efficiently.
2. The 3D rendering method based on adaptive multi-resolution texture mapping as claimed in claim 1, characterized in that: Dynamic level-of-detail interpolation, including: Using historical viewpoint data, the future movement trajectory of the viewpoint is predicted through time series analysis algorithm; Based on the predicted viewpoint position, the required texture detail level is determined and interpolation is performed between adjacent resolution layers; The most recently used interpolation results are cached. When the viewpoint moves to a position close to the interpolation result, the interpolation result is read directly from the cache to reduce computational overhead.
3. The 3D rendering method based on adaptive multi-resolution texture mapping as claimed in claim 2, characterized in that: Using historical viewpoint data, the future movement trajectory of the viewpoint is predicted through time series analysis algorithms, including: Collect historical viewpoint data of the user in the 3D scene, including the position, direction and timestamp of the viewpoint; Preprocess the collected historical viewpoint data to improve prediction accuracy. The preprocessing includes smoothing filtering, outlier detection and correction. The preprocessed viewpoint data is modeled using a time series analysis algorithm, and the ARIMA model is obtained as a prediction model; Fit the ARIMA model through historical viewpoint data and determine the model parameters by finding the parameter combination that minimizes the sum of squares of the model residuals; After the model fitting is completed, the ARIMA model is used to predict the position and direction of future viewpoints.
4. The 3D rendering method based on adaptive multi-resolution texture mapping as claimed in claim 2, characterized in that: Based on the predicted viewpoint position, the required texture detail level is determined and interpolation is performed between adjacent resolution layers, including: According to the predicted viewpoint position, the required texture detail level is determined by comparing the viewpoint distance with a preset distance threshold; The trilinear interpolation method is used for interpolation calculation. It is assumed that at two adjacent texture resolution layers and Interpolate between them to generate a new texture with an intermediate level of detail; Map the predicted viewpoint texture coordinates to a relatively lower resolution texture resolution layer The first coordinate is obtained in the coordinate system of the predicted viewpoint texture coordinates; the predicted viewpoint texture coordinates are mapped to a relatively high-resolution texture resolution layer In the coordinate system of , the second coordinate is obtained; At two texture resolution levels and Find the eight nearest pixel points of the first coordinate, and the coordinate value of the last pixel point among the eight nearest pixel points is the second coordinate; The coordinates of the eight nearest pixel points are trilinearly interpolated to obtain the pixel value at the predicted value of the predicted viewpoint position.
5. The 3D rendering method based on adaptive multi-resolution texture mapping as claimed in claim 2, characterized in that: During the interpolation process, an error control mechanism is introduced to ensure that the error between the texture detail level generated by interpolation and the actual requirements is within an acceptable range.
6. The 3D rendering method based on adaptive multi-resolution texture mapping as claimed in claim 5, characterized in that: Introduce an error control mechanism to ensure that the error between the texture detail level generated by interpolation and the actual requirement is within an acceptable range, including: The mean square error metric is used to evaluate the difference between the interpolation result and the actual texture. The mean square error is calculated by calculating the average of the squares of the difference between the interpolation result and the actual texture pixel value. According to application requirements and rendering quality goals, an error threshold is set. When the calculated mean square error exceeds the error threshold, an error adjustment strategy is adopted or the texture resolution layer is reselected.
7. The 3D rendering method based on adaptive multi-resolution texture mapping as claimed in claim 6, characterized in that: The error adjustment strategy uses one of two strategies: Adjust interpolation algorithm parameters: In trilinear interpolation, adjust the weights of sampling points to reduce errors: in, , , are the pixel values of the three sampling points, and is the adjusted weight; Dynamically adjust texture resolution: select a relatively high-resolution texture resolution layer or a relatively low resolution texture resolution layer Re-interpolation; or, mixed resolution interpolation: combine texture information from multiple resolution layers and generate textures at intermediate detail levels through a hybrid strategy.
8. A 3D rendering system based on adaptive multi-resolution texture mapping, characterized in that: include: The texture library building module pre-builds a multi-resolution texture library for the target 3D model; the multi-resolution texture library contains multiple layers of texture maps from high resolution to low resolution, and each layer of texture maps corresponds to a different level of detail; Dynamic interpolation module detects the distance between the current viewpoint and the target 3D model in real time, adaptively selects the appropriate texture resolution layer according to the distance, and performs dynamic detail level interpolation; The rendering module, combined with GPU acceleration technology, can efficiently render the selected texture resolution layer.
9. A computer-readable storage medium storing one or more programs, characterized in that: The one or more programs include instructions, which, when executed by a computing device, cause the computing device to perform any one of the methods of claims 1 to 7.
10. A computing device, characterized in that include: One or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs include instructions for executing any one of the methods described in claims 1 to 7.