Dump that idea...

Posted by Scott_AW on Sept. 16, 2010, 11:02 p.m.

So as I step into the deep swampy abyss that is voxel rendering, or more like splatting, I encounter strange new beast of mathmatical ferocity.

In other words the idea of having a code based facing system turned out to be a little over bearing and I found a much easier way to store the data.

Running through 6 arrays trying to match up against 52 variations seemed a little much, and it proved so. So I've scrapped that and did what I did with maps.

Basicly make a string of numbers and chop away at it to get the values. Less loopin….much less.

Still it needs work and is not quite perfected.

Reducing models' voxel count in a basic sense, killing all internal voxels was simple. Then those that have open faces get flagged for each shown face.

All that takes place in the model creation process, then comes the current challange, using that data to exclude voxels whose face's cannot be seen.

I'm getting reductions currently, but not in the right way. And I need them reductions because once you hit 1000+ faces, or 2000 triangles, you start to have issues in real-time rendering.

I was going to convert them into models, but then that would require up to 6 faces(12 trigs) for a uncovered voxel. The current method for drawing them is somewhat like the Evaldraw version, using orthographic squares.

These squares are actually just simple polygons that are spun around depending on the camera's angle. Thus the need for realtime rendering.

At this point I'm sure I can find some other techniques to speed things up as well, but the face hidding thing is currently consuming my brain.

I may revist Desertfox's code and try something with a compiled scene of models, or dig into Ken's Slab6 code and figure out how he did the ortho square based voxels.

I could use ortho sprites, but you can't color those and you have less control over them.

At least I have two fall back options if this doesn't work.

Comments

Cesque 14 years, 2 months ago

Just letting you know I read this. Good luck :>

Scott_AW 14 years, 2 months ago

LOL, its a painful process, but its coming along.

Astryl 14 years, 2 months ago

Good luck getting around Ken's code. He has a 'unique' style of coding.

Juju 14 years, 2 months ago

He's self-obfuscating.

Astryl 14 years, 2 months ago

He still uses QBasic… that says a lot. But there's no denying that he's got some really good engine ideas.

Scott_AW 14 years, 2 months ago

Actually I may find my answer in Slab6's code, its a lot simpler than his voxlap stuff.

Otherwise I've made some progress, I'm only see a few gaps, and getting some decent reductions. Still not quite perfect. I was going to put a video up showing the mess ups but it ended up messed up somehow so I'll have to try again later.