Calculating smooth normals in a destructible voxel terrain?

This topic is 722 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

Recommended Posts

I'm building a voxel engine for a destructible chunked (split into same-sized rectangular blocks) voxel terrain.

Previously, I've written a simple voxel engine based on Dual Contouring, but it requires crack patching/stitching (even between chunks with the same LoD/resolution) which is messy and slows down processing.

I'd like to avoid having to deal with that crap by using conformal tetrahedral meshes which require no crack patching at all

(see Longest Edge Bisection, BDAM, Hierarchy of Right Triangles, Diamonds/TetraPuzzles),

e.g. as written in "Real-Time Isosurface Extraction With View-Dependent Level of Detail and Applications" [2015] and "Level of Detail for Real-Time Volumetric Terrain Rendering" [2013].

But calculation of "continuous" normals (to avoid "sharp" lighting artifacts on chunk boundaries) completely ruins the "chunk independence" idea,

because for each boundary vertex I need to know all the triangles sharing this vertex, including the triangles from adjacent chunks.

Is there a way to calculate smooth normals across chunk borders without touching adjacent chunks?

(If the terrain is static, the normals can be precalculated. If the terrain is procedurally generated, the normals can be plausibly estimated.)

Share on other sites

There is no way to produce smooth normals across chunk borders without some knowledge of the voxels in the surrounding chunks.

Common solutions are to have adjacent chunks share the edge voxels between them, or to duplicate the edge voxels in adjacent chunks (doesn't really work with user-editable terrain, for obvious reasons).

More interesting solutions involve getting rid of the notion of chunks for voxel storage - you can still use chunks for mesh extraction and rendering, but store all the voxel data in a single sparse data structure, so that querying neighboring voxels is not expensive.

1. 1
2. 2
3. 3
Rutin
15
4. 4
khawk
13
5. 5
frob
12

• 9
• 9
• 11
• 11
• 23
• Forum Statistics

• Total Topics
633669
• Total Posts
3013257
×