You are not logged in.

#1 2020-09-13 17:03:22

LacyRoderi
Member
From: Netherlands, Enschede
Registered: 2020-09-13
Posts: 1

LOD systems for voxel games (and really

Mostly geometry.
Large voxel terrains may contain millions of polygons.  Rendering such terrains at a uniform scale is both inefficient and can lead to aliasing of distant objects.  As a result, many game engines choose to  implement  some form of  based rendering, so that distant terrain is rendered with less geometry.
In this post, I’ll talk about a simple technique based on vertex clustering with some optimizations to improve seam handling.  The specific ideas in this article are applied to  Minecraft -like blocky terrain using the same clustering/sorting scheme as  M.
Limper, Y.
Jung, J.
Behr, M.
Alexa: ““, Computer Graphics Forum (Proceedings of Pacific Graphics 2013)  Progressively Ordered  Primitive  (POP) buffers are a special case of vertex clustering, where for each level of detail we round the vertices down to the previous power of two.  The cool thing about them is that unlike other level of detail methods, they are  which means that we don’t have to store multiple meshes for each level detail on the GPU.
This determines a  on the vertices.

Figure taken from     To construct the POP buffer

we need to sort the quads and count how many quads are in each LOD.  This is an ideal place to use  which we can do in-place in O(n) time, illustrated in the following psuedo-code:  // Assume MAX_LOD is the total number of levels of detail // quadLOD(.
) computes the level of detail for a quad function sortByLOD (quads) {     const buckets = (new Array(MAX_LOD)).fill(0)     // count number of quads in each LOD     for (let i = 0; i < quads.length; ++i) {         buckets[quadLOD(quads[i])] += 1     }     // compute prefix sum     let t = 0;     for (let i = 0; i < MAX_LOD; ++i) {        const b = buckets[i]        buckets[i] = t        t += b     }     //  partition  quads across each LOD     for (let i = quads.length - 1; i >= 0; --i) {         while (true) {             const q = quads[i]             const lod = quadLOD(q)             const ptr = buckets[lod]             if (i < ptr) {                 break;             }             quads[i] = quads[ptr]             quads[ptr] = q             buckets[lod] += 1         }     }     // buckets now contains the prefixes for each LOD     return buckets }    The quadLOD() helper function returns the coarsest level of detail where a quad is non-degenerate.  If each quad is an integer unit square (i.e.
not the output from a greedy mesh), then we can take the smallest corner and compute the quad LOD in constant time using a call to .  For general quads, the  situation  is a bit more involved.
function intervalLOD (lo, hi) {     for (let i = 0; i <= 32; ++i) {         if ((lo >> i) === (hi >> i)) {             return i         }     } } We can simplify this if our platform supports a fast   operation : function intervalLOD (lo, hi) {     return countLeadingZeroes(lo ^ hi) }    In a voxel engine we need to handle level of detail transitions between adjacent chunks.  Transitions occur when we switch from one level of detail to another abruptly, giving a discontinuity.  These can edges be hidden using  or  at the expense of greater implementation complexity or increased drawing overhead.
Finally, the last issue we need to think  about  are texture coordinates.  We can reuse the same texturing idea from greedy meshing.  For more info see.
This entry was  posted in  , ,.
Bookmark the  permalink .

2 Responses to A level of detail method for blocky voxels
Oswald Hurlem (@OswaldHurlem)             March 4

2018 at 8:39 am       Sea of Memes tried this many a Winter ago and found that just doesn’t read very well.
It looks like a block that’s not far away.
http://www.sea-of-memes.com/LetsCode64/LetsCode64.html This is what they did instead http://www.sea-of-memes.com/LetsCode67/LetsCode67.html But there’s still erasure of details.
LOD systems for voxel  games  (and really, any game with user-created content) remain a bugbear.

What may work instead is a LOD that creates a “curved” model

like marching cubes, but unlike the work done so far, projects details outwards from the model in a way that matches both texture and lighting.
View post on imgur.com   I’m not explaining this well — I comment in the hopes that I am explaining it just well enough.
I haven’t tried it, but I mean to, someday.
Reply.
mikolalysenko             March 4, 2018 at 6:07 pm       One key difference between this approach and Sea of Memes is that this operates on meshes and transitions smoothly, so you don’t get thin features disappearing.
I think it should also be much faster and simpler to implement, but I don’t have access to his code so it is hard to make a direct comparison.
Reply.
Leave a Reply Cancel reply.
Enter your comment here.
Email                  Name                 Website                                                            You are commenting using your WordPress.com account.
(  /     )                                                            You are commenting using your Google account.
(  /     )                                                            You are commenting using your Twitter account.
(  /     )                                                            You are commenting using your Facebook account.
(  /     ).
Follow.
Post to                                                                 bloggers like this:.

Offline

Board footer

Powered by FluxBB