Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 19 May 2011
Offline Last Active Jul 20 2016 07:40 AM

Posts I've Made

In Topic: Space filling curves for 'concentric' flood filling?

16 June 2016 - 01:40 PM

If I understood correctly, Gray codes allow to visit vertices of the cube once,

but I need to walk over the whole surface of the cube.

I'm looking for a (bijective) mapping from integer points on the cube surface to single integers and vice versa (not necessarily a space-filling curve).


btw, it seems in 3D there are no space-filling spiral curves:


In Topic: Work queue with condition variable - design issue

15 June 2016 - 01:19 PM

Thanks for all the answers!

I'll go with the 'dummy-task-just-to-exit-the-loop' approach.

My actual problem was creating/generating/loading/meshing voxel chunks as the player moves through the world (or growing the loaded area when a new world is created).

In Topic: Closing cracks between neighboring chunks with different LoDs in a non-cubica...

22 March 2016 - 05:11 AM

yeah, I've run into the same problem as he did:



basically, the seam nodes gathered from the chunk's neighbors

generate polygons which coincide with the neighbor's polygons.


i.e. octree nodes collected from a neighboring chunk generate polys between themselves.

when later the neighbor's mesh is built, it will also generate the polys in the same positions.


maybe, there's a better algorithm for generating seams?

because all 7 neighbors (connected to the chunk via a seam) must be re-meshed whenever the chunk's LoD changes.

In Topic: Closing cracks between neighboring chunks with different LoDs in a non-cubica...

21 March 2016 - 09:11 AM

Sorry, I didn't understand why the problem should be inversed, drawing the complicated buildings first and then filling the terrain.

Did you mean I should connect terrain to buildings?


btw, I almost solved the seams problem yesterday using octrees.

All cracks are filled correctly, but the seam generator produces overlapping polygons (which causes Z-fighting).


Here's an ugly picture showing a grid consisting of 16x16x2 chunks (resolution of each chunk = 16^3) with some Simplex noise clipped by a box and a few shapes added on top:




I haven't implemented LoD selection yet, only experimented with changing LoDs on a single chunk.

In Topic: Closing cracks between neighboring chunks with different LoDs in a non-cubica...

19 March 2016 - 05:31 AM

I haven't implemented arbitrary meshes yet (they can be easily converted to a signed octree or a BSP tree serving as distance field).

Currently, I'm creating volumetric models from signed distance fields for testing purposes.

Models are represented as signed octrees and allow basic LoD by collapsing all nodes up to a certain level.

Though, at extreme levels of simplification the topology is destroyed (the mesh "opens up" and turns "inside out"). LoDs should be much better with Manifold Dual Contouring (2007) (based on Dual Marching Cubes (Nielson, 2004) which can place up to 4 vertices in a cell thereby guaranteeing 2-manifold quad meshes, but in "Adaptive surface extraction from anisotropic volumetric data: contouring on generalized octrees" they pointed out a non-manifold edge configuration).

I've implemented basic mesh simplification based on half-edge collapses (Stan Melax's algo, dihedral angles), but my iterative version was too slow for practical use.


My game concept is inspired by VoxelFarm, and I want to move on to large worlds where people can build anything (and you need LoDs for buldings).

As far as I know, in VoxelFarm both terrains and buildings are using the same representation.


My current goal is to implement a large procedural terrain which you boolean.

I have a basic chunk system with LoDs (no multiple materials yet), and I was just asking whether there is a good method for stitching chunks.