• entries
2
2
• views
3216

The attempts of one programmer to butcher scripting languages

## Polygonization of Voxels

I just made up a new word - polygonanization! I'm going to force it into at least one conversation today, and confuse everyone. Actually, someone's probably already made it up, which kinda ruins the effect.

Back to my little project, anyway...

Well, I've worked out how I'm going to make my voxel terrain. The user will be able to place a huge number of small cubes. Then he will be able to perform polygonization on these voxels, making a mesh which spans the lot of them. I'm going to be using an algorithm similar to marching cubes, but changing it slightly to allow for pointy bits. I actually got something like marching cubes working, but it was horribly blobby, which might be fine for hills and stuff, but for sharp rocks etc. it will cause problems.

So the way my formula is working is thus: First of all each voxel detects on which other faces it is being touched by other voxels. Next, according to a set of rules, a mesh is made, smoothing the voxels into a mesh, by joining up the half-way points of the edges (not too dissimilar to marching cubes). Then, the polycount can be decreased, by forcing the mesh to make continuous lines rather than rapidly changing ones.

I probably didn't explain that too well. Oh well. I'll be back next week, hopefully with a working algorithm!

## "Hello World!"

What a painfully cliched title, eh?
Anyway, hello random visitor. Not sure how you've stumbled across my blog, but 'hi' all the same. Hopefully you'll enjoy what you read, or at least move swiftly on before it eats too much of your time.

I'm a programmer, working with Unity, attempting to create a procedural world of voxels. Not a particulaly original theme, but it interests me none-the-less. And I'm writing in this journal to make myself do something, have something to show. Because we all know how easy it is to just to skip work, or do very little. So I'm going to do at least weekly posts, to galvanise myself into actually doing some work. Or at least, that's the theory anyway!

Unity + Voxel Terrains:
Nothing at all. A few people are working on it, but no-one has produced a decent Voxel terrain system. So that's another incentive to work hard, I'm at the cutting edge of Unity technology! (I'll ignore the fact that some people could write the same scripts I took a day over in 15 minutes).

Progress so far:
Very little. I've been learning the mesh class in Unity, working out how to make meshes out of vertices. And whilst that seems unrelated, it's part of my plan.

Not a fascinating entry, but it's a start.