VR optimization rendering method based on vertex optimization

By adopting vertex optimization and sharing technology in the Unity engine, combined with vertex buffer object VBO, the problems of low rendering efficiency and high storage requirements caused by high vertex count are solved, achieving more efficient rendering and smoother user experience.

CN119251367APending Publication Date: 2025-01-03JINHUA INSTITUTE OF ZHEJIANG UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411275536.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-12
Publication Date
2025-01-03

AI Technical Summary

Technical Problem

In the Unity engine, a 3D model with a high number of vertices will cause a longer rendering time, affecting frame rate, causing picture lag, delay and even crashes, and the storage and transmission requirements will increase, affecting the distribution and use of applications.

Method used

The rendering method based on vertex optimization is adopted, and the number of vertices is reduced through model vertex optimization and vertex sharing technology, and the vertex buffer object VBO is combined for graphics hardware acceleration processing to optimize rendering efficiency. The specific steps include: establishing a quad-tree/octree data structure, performing grid segmentation and edge collapse, identifying redundant vertices and merging, and using VBO to reduce data transmission between the CPU and GPU.

Benefits of technology

It significantly improves rendering efficiency and resource utilization, provides a smoother user experience, reduces rendering latency and storage requirements, and improves application performance and distributability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119251367A_ABST
    Figure CN119251367A_ABST
Patent Text Reader

Abstract

The invention discloses a VR optimization rendering method based on vertex optimization. The method comprises the following steps: constructing a scene to be optimized and rendered into a three-dimensional model, and then performing vertex optimization processing by using a model vertex optimization method to obtain an optimized three-dimensional model; performing vertex sharing processing on the three-dimensional model of the scene to be optimized and rendered to obtain a shared three-dimensional model; and storing vertex information of the optimized three-dimensional model and the shared three-dimensional model into a central processing unit through a vertex buffer area object embedded in a Unity engine, and then transmitting the vertex information to a graphic processing unit to obtain optimized and rendered VR content. Through the technical means of optimizing vertex processing, utilizing vertex buffer area objects and the like, the three-dimensional rendering performance and the resource utilization efficiency are remarkably improved, and better and richer experience is brought to users.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to a VR optimization rendering method, relates to the field of Unity model development, and specifically to a VR optimization rendering method based on vertex optimization. Background Art

[0002] Unity engine is a cross-platform game engine widely used in game development and virtual reality VR application development. It provides a series of functions from physical simulation, graphics rendering to script programming to help developers create high-quality games and applications.

[0003] 3D models with too many vertices consume more computing resources when rendering. Each vertex needs to be calculated for position, lighting, texture, etc., so an increase in the number of vertices will directly lead to longer rendering time, affect the application's frame rate, and thus reduce the user experience.

[0004] In real-time applications such as games and virtual reality (VR), models with high vertex counts may exceed the processing capabilities of the hardware, causing screen freezes, delays, or even crashes. This is unacceptable for applications that require fast response and smooth experience. Models with a large number of vertices mean that more data needs to be stored. This not only increases the file size, but also places higher demands on the capacity of storage devices. On mobile devices and network transmissions, large files will take up more bandwidth and storage space, which is not conducive to the distribution and use of applications.

[0005] In Unity, performance optimization of model vertices is an important and complex task. Due to the extremely high requirements for models in Unity, it is particularly important to optimize performance to increase frame rate, reduce latency, and improve user experience. Summary of the invention

[0006] In order to solve the problems existing in the background technology, the present invention provides a VR optimization rendering method based on vertex optimization. The present invention aims to improve the rendering efficiency of the application, reduce resource consumption, and speed up the interactive response speed by comprehensively applying multiple optimization strategies, thereby bringing users a smoother and more realistic experience.

[0007] The technical solution adopted by the present invention is:

[0008] The VR optimization rendering method based on vertex optimization of the present invention comprises:

[0009] S1: constructing the scene to be optimized and rendered into a three-dimensional model, and then using a model vertex optimization method to perform vertex optimization processing on the three-dimensional model of the scene to be optimized and rendered to obtain an optimized three-dimensional model.

[0010] S2: performing vertex sharing processing on the three-dimensional model of the scene to be optimized and rendered to obtain a shared three-dimensional model.

[0011] S3: The vertex information of the optimized 3D model and the shared 3D model is stored in the central processing unit (CPU) through the vertex buffer object (VBO) embedded in the Unity engine, and then transmitted to the graphics processing unit (GPU) to obtain the optimized rendered virtual reality (VR) content, and finally realize the optimized rendering of the virtual reality (VR) content.

[0012] In the step S1, the three-dimensional model of the scene to be optimized and rendered is optimized using a model vertex optimization method. First, a quadtree / octree data structure is established through the geometric data of the three-dimensional model to obtain the collapse value of each edge in the three-dimensional model. The geometric data of the three-dimensional model is in a data format such as STL (STereoLithography); then the mesh of the three-dimensional model is hierarchically subdivided by a preset mesh step to obtain a refined three-dimensional model, and then the edges in the refined three-dimensional model whose collapse values ​​are less than a preset collapse threshold are folded, and the adjacent triangular facets of the folded edges are updated to finally obtain an optimized three-dimensional model. The collapse value represents the degree of influence of merging the edge on the shape of the model. The calculation of the collapse value may involve the local geometric features of the vertex (such as curvature, normal vector, etc.) and the relationship with other vertices.

[0013] Model vertex optimization methods can reduce the load of vertex processing, aiming to significantly improve the rendering efficiency and performance of 3D models. By implementing a refined vertex reduction strategy, it effectively reduces the processing burden of the graphics processing unit (GPU) and the central processing unit (CPU) in complex scenes. This process is not only crucial for real-time rendering applications (such as game development and virtual reality experience), but also a key step in optimizing digital content production processes and ensuring high-quality visual experience and smooth interactivity. Model vertex optimization methods can deeply analyze the geometric structure of 3D models, intelligently identify and remove tiny details that have little impact on the overall visual effect, thereby significantly reducing the total number of vertices while maintaining the core features and visual continuity of the model.

[0014] After completing the model vertex optimization, use professional graphics performance analysis tools such as NVIDIA's Nsight Graphics to evaluate its rendering efficiency and visual quality under different hardware configurations. Based on the evaluation results, necessary iterative optimization can be performed until the established performance goals and visual standards are achieved. Model vertex optimization can significantly reduce the vertex processing load during rendering and increase the rendering speed, but it is necessary to balance the compression ratio and model quality to avoid excessive compression that may cause model distortion.

[0015] In the refined three-dimensional model, after the edges with collapse values ​​less than the preset collapse threshold are folded, the two vertices of the folded edges are merged into one vertex, thereby updating the adjacent triangular faces of the folded edges. Specifically, one vertex u1 of the selected edge is folded to another vertex u2, that is, point u1 is deleted, and all its adjacent edges and triangular faces are reconnected to point u2, and point u2 serves as the new point v.

[0016] In step S2, three-dimensional modeling software or mesh optimization tools are used to automatically identify and merge the sharable vertices in the three-dimensional model of the scene to be optimized and rendered, thereby obtaining a shared three-dimensional model.

[0017] Mesh optimization tools such as Blender's Decimate modifier, Maya's Reduce command, etc. These tools usually identify redundant vertices by analyzing the geometry and texture mapping of the mesh, and merge them to reduce the total number of vertices.

[0018] The main purpose of vertex sharing is to optimize rendering performance by reducing the number of unnecessary vertices in the model. In 3D modeling, many surface features of models may contain a large number of repeated geometric shapes or texture mapping areas, which can reduce the processing burden by sharing vertices when rendering.

[0019] The graphics processing unit (GPU) needs to process less vertex data when rendering, thereby improving rendering efficiency. The reduction in vertex data also means less space occupied in the GPU and central processing unit (CPU) memory, which is especially important for resource-constrained devices. In real-time applications such as games and VR, vertex sharing helps reduce rendering delays and provide a smoother interactive experience.

[0020] In the step S3, a vertex buffer object VBO is embedded in the Unity engine, and graphics hardware acceleration processing is performed through the vertex buffer object VBO, so that the vertex information of the optimized three-dimensional model and the shared three-dimensional model is stored in the central processing unit CPU.

[0021] Vertex Buffer Object (VBO) is a graphics hardware acceleration technology that stores vertex data in the memory of the graphics processing unit (GPU) to reduce the number of data transfers between the central processing unit (CPU) and the graphics processing unit (GPU). This helps improve rendering efficiency because data transfer is a major bottleneck in the rendering process. Models that reduce the vertex processing load and models that share vertices use vertex buffer object technology for transmission.

[0022] In the Unity engine, you first need to prepare the vertex data of the model to be rendered, including position, color, texture coordinates, etc. This data usually comes from the model file exported by the 3D modeling software. When importing the model in the Unity engine, make sure the "Optimize Mesh Data" option is enabled, which helps the Unity engine automatically optimize the mesh data during the import process.

[0023] The beneficial effects of the present invention are:

[0024] The beneficial effect of the present invention is that by optimizing vertex processing and utilizing vertex buffer objects and other technical means, the performance and resource utilization efficiency of three-dimensional rendering are significantly improved, bringing users a better and richer experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] Figure 1 is an overall flow chart of the method of the present invention;

[0026] Figure 2 A schematic diagram of the basic concept of the quadtree index of the present invention;

[0027] Figure 3 It is a schematic diagram of the model vertices before and after folding of the present invention. DETAILED DESCRIPTION

[0028] The present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0029] like Figure 1 As shown, the VR optimization rendering method based on vertex optimization of the present invention is specifically as follows:

[0030] S1: Construct the scene to be optimized and rendered as a three-dimensional model, and then use the model vertex optimization method to perform vertex optimization processing on the three-dimensional model of the scene to be optimized and rendered to obtain an optimized three-dimensional model. Use the model vertex optimization method to perform vertex optimization processing on the three-dimensional model of the scene to be optimized and rendered. First, a quadtree / octree data structure is established through the geometric data of the three-dimensional model to obtain the collapse value of each edge in the three-dimensional model. The geometric data of the three-dimensional model is in a data format such as STL (STereoLithography); then the mesh of the three-dimensional model is hierarchically subdivided through a preset mesh step size to obtain a refined three-dimensional model, and then the edges in the refined three-dimensional model whose collapse values ​​are less than the preset collapse threshold are folded, and the adjacent triangle patches of the folded edges are updated to finally obtain an optimized three-dimensional model. The collapse value represents the degree of influence of merging the edge on the shape of the model. The calculation of the collapse value may involve the local geometric features of the vertex (such as curvature, normal vector, etc.) and the relationship with other vertices.

[0031] like Figure 2 As shown, when quadtree indexing, the geographic space is recursively divided into tree structures of different levels. It divides the space of a known range into four equal subspaces, and recursively continues until the tree level reaches a certain depth or meets certain requirements and stops dividing.

[0032] Model vertex optimization methods can reduce the load of vertex processing, aiming to significantly improve the rendering efficiency and performance of 3D models. By implementing a refined vertex reduction strategy, it effectively reduces the processing burden of the graphics processing unit (GPU) and the central processing unit (CPU) in complex scenes. This process is not only crucial for real-time rendering applications (such as game development and virtual reality experience), but also a key step in optimizing digital content production processes and ensuring high-quality visual experience and smooth interactivity. Model vertex optimization methods can deeply analyze the geometric structure of 3D models, intelligently identify and remove tiny details that have little impact on the overall visual effect, thereby significantly reducing the total number of vertices while maintaining the core features and visual continuity of the model.

[0033] After completing the model vertex optimization, use professional graphics performance analysis tools such as NVIDIA's Nsight Graphics to evaluate its rendering efficiency and visual quality under different hardware configurations. Based on the evaluation results, necessary iterative optimization can be performed until the established performance goals and visual standards are achieved. Model vertex optimization can significantly reduce the vertex processing load during rendering and increase the rendering speed, but it is necessary to balance the compression ratio and model quality to avoid excessive compression that may cause model distortion.

[0034] In the refined three-dimensional model, after the edges with collapse values ​​less than the preset collapse threshold are folded, the two vertices of the folded edges are merged into one vertex, thereby updating the adjacent triangular faces of the folded edges. Specifically, one vertex u1 of the selected edge is folded to another vertex u2, that is, point u1 is deleted, and all its adjacent edges and triangular faces are reconnected to point u2, and point u2 is used as the new point v.

[0035] S2: Performing vertex sharing processing on the three-dimensional model of the scene to be optimized and rendered to obtain a shared three-dimensional model. Using three-dimensional modeling software or mesh optimization tools to automatically identify and merge sharable vertices in the three-dimensional model of the scene to be optimized and rendered to obtain a shared three-dimensional model.

[0036] Mesh optimization tools such as Blender's Decimate modifier, Maya's Reduce command, etc. These tools usually identify redundant vertices by analyzing the geometry and texture mapping of the mesh, and merge them to reduce the total number of vertices.

[0037] The main purpose of vertex sharing is to optimize rendering performance by reducing the number of unnecessary vertices in the model. In 3D modeling, many surface features of models may contain a large number of repeated geometric shapes or texture mapping areas, which can reduce the processing burden by sharing vertices when rendering.

[0038] The graphics processing unit (GPU) needs to process less vertex data when rendering, thereby improving rendering efficiency. The reduction in vertex data also means less space occupied in the GPU and central processing unit (CPU) memory, which is especially important for resource-constrained devices. In real-time applications such as games and VR, vertex sharing helps reduce rendering delays and provide a smoother interactive experience.

[0039] S3: The vertex information of the optimized 3D model and the shared 3D model is stored in the central processing unit CPU through the vertex buffer object VBO embedded in the Unity engine, and then transmitted to the graphics processing unit GPU to obtain the optimized rendered virtual reality VR content, and finally achieve the optimized rendering of the virtual reality VR content. The vertex buffer object VBO is embedded in the Unity engine, and the graphics hardware acceleration processing is performed through the vertex buffer object VBO, so that the vertex information of the optimized 3D model and the shared 3D model is stored in the central processing unit CPU.

[0040] Vertex Buffer Object (VBO) is a graphics hardware acceleration technology that stores vertex data in the memory of the graphics processing unit (GPU) to reduce the number of data transfers between the central processing unit (CPU) and the graphics processing unit (GPU). This helps improve rendering efficiency because data transfer is a major bottleneck in the rendering process. Models that reduce the vertex processing load and models that share vertices use vertex buffer object technology for transmission.

[0041] In the Unity engine, you first need to prepare the vertex data of the model to be rendered, including position, color, texture coordinates, etc. This data usually comes from the model file exported by the 3D modeling software. When importing the model in the Unity engine, make sure the "Optimize Mesh Data" option is enabled, which helps the Unity engine automatically optimize the mesh data during the import process.

[0042] In the Unity engine script, you can use the binding of the underlying graphics API (Application Programming Interface) (such as OpenGL or DirectX) to create a vertex buffer object VBO. The Unity engine itself can control how vertex data is processed through Shader and Material. You can specify how to read and process the data in the vertex buffer object VBO by writing a custom Shader or using Unity's ShaderLab language. In the Shader, you can use specific semantics (such as POSITION, TEXCOORD, etc.) to tell the graphics processing unit GPU how to read vertex data from the vertex buffer object VBO.

[0043] During rendering, the GPU reads vertex data directly from the Vertex Buffer Object (VBO) and uses this data to generate images. Since the data is already stored in the GPU memory, the number of data transfers between the CPU and the GPU is reduced. VBO significantly reduces the number of data transfers between the CPU and the GPU, which is a major bottleneck in the rendering process. Since the data is already stored in the GPU memory, the GPU can access and process this data faster, thereby improving rendering efficiency.

[0044] When developing a 3D role-playing game, the character models in the game often contain a large number of vertices and faces, and many parts of these models (such as symmetrical limbs, repeated texture areas, etc.) can be optimized through vertex sharing. In 3D modeling software (such as Blender, Maya, etc.), when designers build character models, they ensure that symmetrical parts (such as left and right arms, left and right legs) are created using mirror tools to automatically share vertices. For areas with repeated textures (such as patterns on clothing), try to adjust the mesh structure to share vertices. Use the mesh optimization tools of the modeling software (such as Blender's Decimate modifier) ​​to further merge vertices that can be shared and reduce the total number of vertices. Vertex optimization can significantly reduce the number of vertices that the GPU needs to process during rendering, improve rendering efficiency, reduce memory usage, and improve the performance of the game on resource-constrained devices.

[0045] The application of vertex buffer objects VBO in real-time rendering scenes. When developing a virtual reality VR application that supports real-time rendering of large-scale scenes, in order to improve rendering efficiency, it is necessary to use vertex buffer objects VBO to reduce data transmission between the central processing unit CPU and the graphics processing unit GPU. The Unity engine exports model data in the scene in 3D modeling software, including vertex positions, texture coordinates, etc. In the Unity engine, although the creation of vertex buffer objects VBO is not directly managed, you can specify how to read the data in the vertex buffer object VBO by writing a custom Shader or using the ShaderLab language of the Unity engine. Use the binding of the Unity engine's graphics API (such as the Unity package of OpenGL or DirectX) to upload the vertex data to the vertex buffer object VBO of the graphics processing unit GPU.

[0046] During the rendering process, the graphics processing unit (GPU) reads vertex data directly from the vertex buffer object (VBO) and uses this data to generate images. The rendering engine of the Unity engine automatically handles the caching and updating of the vertex buffer object (VBO) to ensure rendering efficiency. The vertex buffer object (VBO) can reduce the number of data transmissions between the central processing unit (CPU) and the graphics processing unit (GPU), improving rendering efficiency. The cache mechanism of the graphics processing unit (GPU) is used to further improve data access speed. Improve the smoothness and stability of real-time rendering of large-scale scenes.

[0047] When developing a game that requires efficient rendering of complex scenes, combining vertex sharing and vertex buffer objects (VBOs) can further improve performance. In the early stages of game development, preprocess all 3D models, including vertex sharing optimization and mesh cleanup. In the game engine (such as Unity, Unreal Engine, etc.), ensure that all imported models use vertex buffer objects (VBOs) to store vertex data. Use tools or scripts provided by the game engine to automatically upload vertex data to vertex buffer objects (VBOs) and manage the life cycle of vertex buffer objects (VBOs). During the rendering process, use multi-level of detail (LOD) technology combined with vertex buffer objects (VBOs) to dynamically adjust the model's level of detail based on the distance and angle of the observer. Use occlusion culling technology to reduce the rendering of unnecessary objects and further reduce the rendering burden.

Claims

1. A VR optimization rendering method based on vertex optimization, characterized in that: include: S1: constructing the scene to be optimized and rendered into a three-dimensional model, and then using a model vertex optimization method to perform vertex optimization processing on the three-dimensional model of the scene to be optimized and rendered to obtain an optimized three-dimensional model; S2: performing vertex sharing processing on the three-dimensional model of the scene to be optimized and rendered to obtain a shared three-dimensional model; S3: The vertex information of the optimized 3D model and the shared 3D model is stored in the central processing unit CPU through the vertex buffer object VBO embedded in the Unity engine, and then transmitted to the graphics processing unit GPU to obtain the optimized rendered virtual reality VR content, and finally realize the optimized rendering of the virtual reality VR content.

2. The VR optimization rendering method based on vertex optimization according to claim 1, characterized in that: In the step S1, a model vertex optimization method is used to perform vertex optimization processing on the three-dimensional model of the scene to be optimized and rendered. First, a quadtree / octree data structure is established through the geometric data of the three-dimensional model to obtain the collapse value of each edge in the three-dimensional model; then, the grid of the three-dimensional model is hierarchically subdivided through a preset grid step size to obtain a refined three-dimensional model, and then the edges in the refined three-dimensional model whose collapse values ​​are less than a preset collapse threshold are folded, and the adjacent triangle facets of the folded edges are updated to finally obtain an optimized three-dimensional model.

3. The VR optimization rendering method based on vertex optimization according to claim 2, characterized in that: In the refined three-dimensional model, after the edge with a collapse value less than a preset collapse threshold is folded, two vertices of the folded edge are merged into one vertex, so that the adjacent triangle facets of the folded edge are updated.

4. The VR optimization rendering method based on vertex optimization according to claim 1, characterized in that: In step S2, three-dimensional modeling software or mesh optimization tools are used to automatically identify and merge the sharable vertices in the three-dimensional model of the scene to be optimized and rendered, thereby obtaining a shared three-dimensional model.

5. The VR optimization rendering method based on vertex optimization according to claim 1, characterized in that: In the step S3, a vertex buffer object VBO is embedded in the Unity engine, and graphics hardware acceleration processing is performed through the vertex buffer object VBO, so that the vertex information of the optimized three-dimensional model and the shared three-dimensional model is stored in the central processing unit CPU.