joschka12 wrote:
Currently I am working with the OPENGLExample for PolyVox. I am aware that this is currently just a basic example (even if you can do a lot already).
Actually I've been working on it quite a lot over the past few days. I have updated it so that it is much faster, includes lighting, and also shows how to make different colour voxels. The code is getting complicated but I will comment and simplify it as I progress.
I would like to make sure that this example runs on as many graphics cards as possible, so would you mind testing it for me as I know you have an older machine? You can try compiling from source, or you can grab a prebuilt version here:
http://www.david-williams.info/linked_f ... 032008.zipThe console in the background should print out the frame rate - I would be interested in what you get.
joschka12 wrote:
I would like to understand, if PolyVox is intended to handle textures, materials etc. or if the user of PolyVox has to take care of that(if yes I'd like a hint or two how to begin)?
Mostly it is down to the application - this allows applications to have maximum flexibility about how they render the surface. The only thing that PolyVox does is to provide a material ID for each vertex it generates. This is simply an integer (well it's actually a float, but I will change it to an integer) which tells you which voxel a vertex came from. In the new OpenGL Example there is some code like this:
Code:
GLfloat red = 0.0f;
GLfloat green = 0.0f;
GLfloat blue = 0.0f;
uint8 material = vertex.getMaterial() + 0.5;
switch(material)
{
case 1:
red = 1.0;
green = 0.0;
blue = 0.0;
break;
case 2:
red = 0.0;
green = 1.0;
blue = 0.0;
break;
case 3:
red = 0.0;
green = 0.0;
blue = 1.0;
break;
case 4:
red = 1.0;
green = 1.0;
blue = 0.0;
break;
case 5:
red = 1.0;
green = 0.0;
blue = 1.0;
break;
}
This chooses a color for OpenGL to render, based on the voxel that the vertex came from.
joschka12 wrote:
Will your example contain a camera (movable)? Because I need to know, what I need to add to make the tests visually nice looking and how to take a closer look.
I have added rotation, and will probably add a zoom function as well.
joschka12 wrote:
Will PolyVox contain an exporter to use the modeled objects in ... lets say Thermite?
I think that it will be possible for the PolyVox OpenGL example to load volumes which were created for Thermite. However, they won't look exactly the same as I'm not planning to add support for texturing to the OpenGL example (just because I want to keep things simple).
joschka12 wrote:
Btw. I'd appreciate a hyperlink back to the Thermite homepage on the pages of the forum.
Maybe... I will change it if I can work out how