I then apply transparency to display the 3D shape we're looking for. I'm using simple OpenGL cubes for my voxels, and I get a result like this:

The main problem is that I can see a grid of cube edges within the data. I've also noticed that the order in which I draw the layers matters - the red layer is on top of the green layer, but is drawn as if it were 'covered' by it. I'm using the following for my lighting and blending:
glClearDepth(1.0f);
glEnable(GL_DEPTH_TEST);
glDepthFunc(GL_LEQUAL);
glEnable(GL_TEXTURE_2D);
//### Re-normalize surface normals after scaling operations ###
glEnable(GL_NORMALIZE);
//### Configure the lighting model ###
glEnable(GL_LIGHTING);
glLightModeli(GL_LIGHT_MODEL_LOCAL_VIEWER, GL_TRUE);
glLightModeli(GL_LIGHT_MODEL_TWO_SIDE, GL_TRUE);
//### Enable smooth shading ###
glShadeModel(GL_SMOOTH);
//### Configure blending ###
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
1) Does anyone know how to get rid of the grid-like effect?
2) Is there anything I should be changing in my blending configuration?
Any help is greatly appreciated!
Edited by myrdos, 22 October 2012 - 04:15 PM.







