Topographic rendering method based on voxels

Through a rendering method that combines multi-layer material weight control, triple projection sampling and ARDM maps, the problems of rough material expression and texture distortion in voxel rendering are solved, and high-quality terrain rendering effects are achieved.

CN120635280APending Publication Date: 2025-09-12SNAIL GAMES
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510763040.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-09
Publication Date
2025-09-12

AI Technical Summary

Technical Problem

In the existing technology, voxel rendering methods have problems such as rough material expression, abrupt material transitions, repeated textures and distortion of distant views, resulting in unnatural rendering effects for complex terrain.

Method used

A rendering method that combines multi-layer material weight control, triple projection sampling method and ARDM map is adopted. By defining three layers of materials for each voxel and using triple projection sampling method to sample the diffuse map, ARDM map and normal map of each layer of material, high-quality rendering results are generated.

Benefits of technology

It achieves efficient and realistic terrain rendering, with natural material transitions, significantly improved terrain diversity and visual consistency, reduced storage pressure and guaranteed efficient operation of the rendering pipeline.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120635280A_ABST
    Figure CN120635280A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of computer graphics, in particular to a voxel-based terrain rendering method. The terrain rendering method comprises the following steps: defining at least three layers of materials for each voxel of a terrain, and distributing different weights for the materials of each layer; sampling the diffuse reflection chartlet of each layer of material by using a triple projection sampling method, and generating and mixing basic colors; recording the ambient light shielding value, the roughness value, the metallization value and the displacement value of each layer of material by using an ARDM map; a triple projection sampling method is used for sampling the ARDM maps of the multiple layers of materials, and generation and mixing of ambient light shielding, roughness, metallization and displacement values are carried out; a triple projection sampling method is used for sampling the normal diagrams corresponding to all layers of materials, and normal information of the voxel terrain is generated; and mixing the rendering attributes of different layers of materials layer by layer according to the weight to generate a rendering result. According to the voxel-based terrain rendering method, efficient and vivid terrain rendering is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer graphics technology, and in particular to a voxel-based terrain rendering method. Background Art

[0002] With the rapid development of computer graphics technology, the generation and rendering of virtual scenes have become core requirements in game development, film and television special effects, virtual reality, and other fields. However, efficient and detailed rendering of large-scale terrain has always been a technical challenge. Traditional methods rely primarily on polygonal meshes, constructing terrain surfaces by stitching together triangles. However, this technology suffers from insufficient detail when rendering complex terrain and difficulty handling complex geometry.

[0003] To better simulate complex terrain structures and overcome the limitations of polygonal mesh technology, the industry typically uses voxel technology. As discrete units in three-dimensional space, voxels naturally possess volumetric properties, enabling them to directly describe the distribution of materials within a terrain (e.g., rock and soil layers). They are particularly adept at expressing complex geometric structures (e.g., underground caves and layered sediments).

[0004] However, the voxel technology used in existing technologies often has the following defects when rendering complex terrain:

[0005] 1. Rough material expression. Traditional voxel rendering often uses a single material or simple interpolation, resulting in abrupt material transitions (such as the abrupt boundary between rock and soil) and a lack of natural gradient effects.

[0006] 2. Repeated textures and distant view distortion: To save resources, voxel terrains often reuse the same texture maps, resulting in noticeable repeating patterns in the mid- and distant views (such as the regularly arranged dunes in a desert), which undermines the scene's realism. Furthermore, traditional UV mapping is prone to stretching and distortion on spherical or curved terrains (such as extreme texture distortion). Summary of the Invention

[0007] In order to address the deficiencies in the prior art, the present application aims to provide a voxel-based terrain rendering method to achieve high-quality terrain rendering.

[0008] To achieve the above objectives, the present application provides a voxel-based terrain rendering method, comprising:

[0009] Define at least three layers of materials for each voxel of the terrain, and assign different weights to the materials of each layer;

[0010] Use triple projection sampling to sample the diffuse map of each layer of material to generate and mix the base color;

[0011] Use ARDM graph to record the ambient occlusion, roughness, metalness and displacement values ​​of each layer of material;

[0012] Use triple projection sampling to sample the ARDM map of each layer of material to generate and mix ambient occlusion, roughness, metalness and displacement values;

[0013] Use triple projection sampling method to sample the normal map corresponding to each layer of material to generate the normal information of the voxel terrain;

[0014] The rendering properties of different layers of materials are mixed layer by layer according to the weights to generate the rendering results.

[0015] Furthermore, each layer of the material includes the following six rendering attribute values: base color, displacement, metalness, roughness, normal and ambient occlusion value.

[0016] Furthermore, each voxel is defined with three different layers of materials; each material corresponds to a flat terrain diffuse map, a sloped terrain diffuse map, and a distant terrain diffuse map; the flat terrain diffuse map, the sloped terrain diffuse map, and the distant terrain diffuse map each correspond to a normal map.

[0017] Furthermore, the specific steps of sampling the diffuse reflection map of each layer using the triple projection sampling method to generate and mix the basic colors include:

[0018] For each layer of material, for the near view, the top diffuse map and the slope diffuse map are sampled separately through the near-distance texture scaling coefficient, and the slope of the terrain is used as the coefficient to interpolate and mix to generate the near view color.

[0019] Furthermore, the method further comprises:

[0020] For the distant view, the color of the distant diffuse map is sampled by the distant texture scaling coefficient and the mixed color in the previous step, and the near and distant textures are dynamically interpolated by the Camera Depth Fade coefficient.

[0021] Furthermore, the method further comprises:

[0022] During the perspective sampling process, the Texture Variation method is used.

[0023] Furthermore, three ARDM maps are applied to each layer of material, which record the ambient occlusion, roughness, metalness and displacement values ​​of flat terrain, sloped terrain and distant scenery respectively.

[0024] To achieve the above-mentioned purpose, the electronic device provided by this application includes:

[0025] processor;

[0026] a memory having stored thereon one or more computer program instructions executed on the processor;

[0027] When the processor runs the computer instructions, the voxel-based terrain rendering method as described above is performed.

[0028] To achieve the above objectives, the present application provides a computer-readable storage medium having computer instructions stored thereon. When the computer instructions are executed by a processor, the steps of the voxel-based terrain rendering method described above are executed.

[0029] The present application proposes a voxel-based terrain rendering method, which achieves efficient and realistic terrain rendering through multi-layer material weight control, triple projection sampling, and ARDM map compression.

[0030] This application proposes a voxel-based terrain rendering method that combines material layering with dynamic blending, uses noise maps to control transition areas, and introduces distant texture randomization technology, significantly improving terrain diversity and visual coherence.

[0031] The present application discloses a voxel-based terrain rendering method that integrates multi-attribute data through a four-channel ARDM map, thereby reducing storage pressure while ensuring efficient operation of the rendering pipeline.

[0032] Other features and advantages of the present application will be set forth in the following description, and in part will be apparent from the description, or may be learned by practicing the present application. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0034] Figure 1 Schematic diagram of the flow of the voxel-based terrain rendering method of this application. DETAILED DESCRIPTION

[0035] The following describes embodiments of the present application in more detail with reference to the accompanying drawings. Although certain embodiments of the present application are shown in the accompanying drawings, it should be understood that the present application can be implemented in various forms and should not be construed as limited to the embodiments described herein. Instead, these embodiments are provided to provide a more thorough and complete understanding of the present application. It should be understood that the drawings and embodiments of the present application are for illustrative purposes only and are not intended to limit the scope of protection of the present application.

[0036] It should be understood that the various steps described in the method embodiments of the present application can be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present application is not limited in this respect.

[0037] As used herein, the term "including" and its variations are open-ended, i.e., "including but not limited to." The term "based on" means "based, at least in part, on." The term "one embodiment" means "at least one embodiment," the term "another embodiment" means "at least one additional embodiment," and the term "some embodiments" means "at least some embodiments." Other terms are defined in the following description.

[0038] It should be noted that the modifications of "one" and "plurality" mentioned in this application are illustrative rather than restrictive. Those skilled in the art will understand that unless the context clearly indicates otherwise, they should be understood as "one or more." "Plurality" should be understood as two or more.

[0039] Voxels, voxel technology is an important three-dimensional representation and processing method in the field of rendering. Voxels are the basic units in three-dimensional space, similar to pixels in two-dimensional images. Each voxel represents a small cube in three-dimensional space and can store information such as color, density, and material properties. Voxel technology divides three-dimensional space into a regular grid of cubes, and each voxel can store a variety of information, such as color, density, and material properties. With this information, voxel technology can accurately represent the internal structure and surface details of objects. The simplicity and regularity of the voxel grid give it an advantage when processing complex geometric shapes and internal structures.

[0040] Rendering refers to the standardized process of converting a three-dimensional model into a two-dimensional image, which usually includes vertex processing, rasterization, pixel shading and post-processing. The pixel shading process mainly includes material calculation and lighting interaction. Among them, material calculation calculates color based on textures (Diffuse, Normal, etc.) and lighting models (such as Phong, PBR), and lighting interaction simulates effects such as light reflection, refraction and shadow.

[0041] In computer graphics, a material is a collection of optical properties that describe an object's surface. It defines how an object reflects and refracts light, as well as its color. Material properties typically include diffuse reflectance, specular reflectance, and transparency. In modern rendering engines, materials are implemented through shaders, which combine textures and parameters to precisely control an object's appearance. For example, metal has high reflectance and low diffuse reflectance, while plastic has the opposite. Materials are key to giving objects a realistic feel.

[0042] Diffuse maps define the base color of an object's surface, simulating the color distribution of an object under uniform lighting. They don't include lighting effects and only provide basic color information. In PBR, diffuse maps are often combined with parameters like metalness and roughness to accurately reproduce the color and material properties of an object, making them an essential element in rendering.

[0043] The ARDM map is a comprehensive map used in PBR workflows, encompassing information such as ambient occlusion, metalness, vertex displacement, and roughness. It integrates multiple material properties into a single map, streamlining the workflow and improving efficiency. It accurately reproduces the appearance of both metallic and non-metallic materials, making it key to achieving realism in modern rendering.

[0044] Triple projection sampling is a texture mapping technique that samples textures in three different directions (typically the X, Y, and Z axes) to ensure accurate display of texture details at any viewing angle. It solves the distortion problem caused by perspective changes in texture mapping of complex geometry and is particularly suitable for objects with complex surfaces, such as terrain and mechanical parts, significantly improving the realism and consistency of visual effects.

[0045] Normals are vectors perpendicular to an object's surface and are used to calculate lighting effects. They determine the direction in which light reflects off an object's surface, affecting the object's appearance of light and shadow. In 3D rendering, normals are fundamental to lighting calculations. By changing their direction, complex surface details and lighting effects can be simulated.

[0046] Normal maps are texture maps used to simulate highly detailed geometry on an object's surface. By changing the direction of the surface normals, normal maps can simulate complex surface details without increasing the geometric complexity. They are often used to enhance the realism of objects such as skin and cloth.

[0047] Hereinafter, embodiments of the present application will be described in detail with reference to the accompanying drawings.

[0048] Example 1

[0049] An embodiment of the present application provides a voxel-based terrain rendering method to achieve high-quality terrain rendering.

[0050] Figure 1 This is a flow chart of the voxel-based terrain rendering method of this application, which will be referred to below. Figure 1 The voxel-based terrain rendering method of this application is described in detail, including:

[0051] Step S101: define at least three layers of materials for each voxel of the terrain, and assign different weights to the materials of each layer.

[0052] In this implementation, the terrain is divided into a 3D voxel grid, with each voxel managed and rendered as an independent 3D unit. Three different layers of materials are assigned to each voxel, each with a corresponding weight. These weights control the blending between the different materials, ensuring a natural transition between the different layers based on the terrain's characteristics.

[0053] In other implementations, each voxel of the terrain may be configured with four, five, or other multi-layer materials.

[0054] In this embodiment, each layer of material includes 6 rendering attribute values: Base Color, Metallic, Displacement, Roughness, Normal, and AO.

[0055] In some other implementations, each layer of material may include only some of the above rendering attribute values, or may include more attributes such as Emissive (self-luminous) attributes.

[0056] In this embodiment, each layer of material includes a flat terrain diffuse reflection map, a slope terrain diffuse reflection map, and a distant terrain diffuse reflection map; the flat terrain diffuse reflection map, the slope terrain diffuse reflection map, and the distant terrain diffuse reflection map each correspond to a normal map.

[0057] It should be noted that the flat terrain diffuse map describes the diffuse color that the flat voxel terrain should have in the near field; the slope terrain diffuse map describes the diffuse color that the voxel terrain with a slope should have in the near field; the background terrain diffuse map describes the diffuse color that the voxel terrain should have in the distant field.

[0058] Step S102: Use triple projection sampling method to sample the diffuse reflection map of each layer of material to generate and mix the basic color.

[0059] In this embodiment, the color of each layer of material is determined according to the result of sampling the diffuse reflection map. The specific steps include:

[0060] For each layer, for the near view, the top diffuse map and the slope diffuse map are sampled respectively through the near texture scaling coefficient, and the slope of the terrain is used as the coefficient to interpolate and mix to generate the near view color. For the far view, the far view diffuse map is sampled through the far texture scaling coefficient to form the far view color.

[0061] In this embodiment, Camera Depth Fade is also used as a weight to dynamically blend between near-view and far-view textures to ensure that materials at different distances show details.

[0062] Exemplarily, the near view Top texture and Slope texture, as well as the near view scaling ratio are set, such as the near distance texture scaling ratio (eg, 0.5 m / pixel) and the SlopeScale slope (eg, 0.5).

[0063] Then, calculate the dot product of the terrain's Up direction vector and the vertex normal vector, subtract the dot product from 1, and multiply it by SlopeScale. For example, the formula is as follows:

[0064] Slope=(1-DotProduct(UpVector,VertexNormal))*SlopeScale;

[0065] SlopeScale is a user-defined value between 0 and 1. This value is used to interpolate between the Top and Slope textures, with a value between 0 and 1. 1 indicates that the terrain is completely flat and does not require a slope material; 0 indicates that the terrain must use a slope material entirely.

[0066] Use the near texture scale to sample the top and slope textures separately. For example, the near texture UV coordinates are: UV_Near = WorldPos (world coordinates) / Near Texture Scale (near texture scale). After sampling, you can get the near top color value Color_Top and the near slope color value Color_Slope.

[0067] Then, the foreground color is obtained by mixing the colors of the top texture and the slope texture according to the weight. For example, the formula is as follows:

[0068] NearColor=lerp(Color_Top, Color_Slope, Slope).

[0069] Then, define the Far Texture and Distance Texture scaling (e.g. 10 meters / pixel) and the transition distance range (e.g. 20 meters to 100 meters).

[0070] Then, calculate the camera depth weight and obtain the depth value (Depth) from the current pixel to the camera through the rendering pipeline. Use linear interpolation (Lerp) or nonlinear functions (such as smooth step function) to map the depth to the depth weight (Weight). For example, the formula is as follows:

[0071] Weight=smoothstep(TransitionStart,TransitionEnd,Depth);

[0072] Among them, smoothstep() is a smooth step function, TransitionStart is the start distance of the transition, TransitionEnd is the end distance of the transition, and Depth is the depth.

[0073] When Depth < TransitionStart, Weight = 0 (fully using the near - view texture).

[0074] When Depth > TransitionEnd, Weight = 1 (fully using the far - view texture).

[0075] Within the transition range, Weight gradually changes from 0 to 1 (smooth interpolation).

[0076] Then start sampling the far - view Far texture. The far - view texture coordinates: UV_Far = WorldPos / Far TextureScale (the scaling ratio of the long - distance texture); perform texture sampling on it to obtain the far - view color value Color_Far; dynamically mix it with the near - view color value Color_Near, and mix the near - and far - view colors according to the weight to obtain the final color. Exemplarily, the formula is as follows: FinalColor = lerp(Color_Near, Color_Far, Weight).

[0077] Step S103: Use the ARDM map to record the ambient occlusion, roughness, metallicity, and displacement values of each layer of material;

[0078] In this embodiment, a four - channel ARDM (Ambient Occlusion, Roughness, Displacement, Metallic) map is used to record the displacement, metallicity, roughness, and ambient occlusion values of each layer of material; each layer of material corresponds to three ARDM maps, and the three ARDM maps respectively record the ambient occlusion, roughness, metallicity, and displacement values of flat terrain, slope terrain, and far - view.

[0079] Step S104: Use the triple - projection sampling method to sample the ARDM maps of multiple layers of materials to generate and mix the ambient occlusion, roughness, metallicity, and displacement values.

[0080] In this embodiment, the triple - projection sampling technique is used to sample the three ARDM maps of each layer of material, and the slope weight Slope and the depth weight Weight are used for interpolation and dynamic mixing to generate the final ARDM.

[0081] Step S105: Use the triple - projection sampling method to sample the normal maps corresponding to each layer of material to generate the normal information of the voxel terrain;

[0082] In this embodiment, the three normal maps of each layer of material are sampled using triple projection sampling technology, and the slope weight Slope and depth weight Weight are interpolated and dynamically mixed to generate the final normal information.

[0083] It can be understood that the three normal maps respectively record the normal information of the foreground flat terrain, the normal information of the foreground sloping terrain, and the normal information of the distant terrain.

[0084] Step S106: Mix the rendering attributes of the materials of different layers layer by layer according to the weights to generate a rendering result.

[0085] According to the weight of each layer of material, the six attribute values ​​of base color, Metallic, Displacement, Roughness, Normal and AO are mixed layer by layer and rendered to generate the final rendering result of voxel terrain.

[0086] During the rendering process, the rendering method of this application uses noise control, dynamic mixing of near and far textures, and combines ARDM maps and triple projection sampling technology to ensure rich terrain details, natural material transitions, and maintain high-quality performance at different distances.

[0087] Example 2

[0088] In this embodiment, an electronic device is further provided, comprising a processor and a memory. The memory is configured to store non-transitory computer-readable instructions (e.g., one or more computer program modules). The processor is configured to execute the non-transitory computer-readable instructions, which, when executed by the processor, can perform one or more steps of the voxel-based terrain rendering method described above.

[0089] Example 3

[0090] In this embodiment, a computer-readable storage medium is further provided, the storage medium being configured to store non-transitory computer-readable instructions. For example, when the non-transitory computer-readable instructions are executed by a computer, one or more steps of the voxel-based terrain rendering method described above may be performed.

[0091] The above description is only a partial embodiment of the present application and an illustration of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in this application is not limited to the technical solutions formed by the specific combination of the above technical features, but also includes other technical solutions formed by any combination of the above technical features or their equivalents without departing from the above disclosed concepts. For example, the above features can be replaced with (but not limited to) technical features with similar functions disclosed in this application.

[0092] In addition, although adopting specific order to describe each operation, this should not be interpreted as requiring these operations to be performed in the specific order shown or in sequential order. Under certain environment, multitasking and parallel processing may be advantageous. Similarly, although comprising some specific implementation details in the above discussion, these should not be interpreted as limiting the scope of the application. Some features described in the context of separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment also can be implemented in multiple embodiments individually or in the mode of any suitable subcombination.

[0093] Although the subject matter has been described in language specific to structural features and / or methodological logical acts, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are merely example forms of implementing the claims.

Claims

1. A voxel-based terrain rendering method, characterized in that: include: Define at least three layers of materials for each voxel of the terrain, and assign different weights to the materials of each layer; Use triple projection sampling to sample the diffuse map of each layer of material to generate and mix the base color; Use ARDM graph to record the ambient occlusion, roughness, metalness and displacement values ​​of each layer of material; Use triple projection sampling to sample the ARDM map of each layer of material to generate and mix ambient occlusion, roughness, metalness and displacement values; Use triple projection sampling method to sample the normal map corresponding to each layer of material to generate the normal information of the voxel terrain; The rendering properties of different layers of materials are mixed layer by layer according to the weights to generate the rendering results.

2. The voxel-based terrain rendering method according to claim 1, characterized in that: Each layer of the material includes the following 6 rendering attribute values: base color, displacement, metalness, roughness, normal and ambient occlusion value.

3. The voxel-based terrain rendering method according to claim 2, characterized in that: Each voxel is defined with three different materials; each material corresponds to a flat terrain diffuse map, a sloped terrain diffuse map and a distant terrain diffuse map; the flat terrain diffuse map, the sloped terrain diffuse map and the distant terrain diffuse map each correspond to a normal map.

4. The voxel-based terrain rendering method according to claim 3, characterized in that: The specific steps of using the triple projection sampling method to sample the diffuse reflection map of each layer and generate and mix the base color include: For each layer of material, for the near view, the top diffuse map and the slope diffuse map are sampled separately through the near texture scaling coefficient, and the slope of the terrain is used as the coefficient to interpolate and mix to generate the near view color; for the far view, the far view diffuse map is sampled through the far texture scaling coefficient to form the far view color.

5. The voxel-based terrain rendering method according to claim 4, characterized in that: The method further comprises: Dynamically interpolate and blend near and far textures through the Camera Depth Fade coefficient.

6. The voxel-based terrain rendering method according to claim 5, characterized in that: The method further comprises: During the perspective sampling process, the Texture Variation method is used.

7. The voxel-based terrain rendering method according to claim 1, characterized in that: Three ARDM maps are used for each layer of material. The three ARDM maps record the ambient occlusion, roughness, metalness and displacement values ​​of flat terrain, sloped terrain and distant scenery respectively.

8. An electronic device, characterized in that: include: processor; a memory having stored thereon one or more computer program instructions executed on the processor; Wherein, when the processor runs the computer program instructions, it executes the voxel-based terrain rendering method according to any one of claims 1-7.

9. A computer-readable storage medium, characterized in that Computer instructions are stored thereon, and when the computer instructions are executed, the steps of the voxel-based terrain rendering method according to any one of claims 1 to 7 are executed.