Quote:
I tried it - it looks nice! The parallax mapping is particularly pretty. And I like the way the candles flicker in time with the music

Only problem was the movement was really slow... maybe it's dependant on framerate?
Thank you!

Yeah, the movement is somewhat slow, but not depending to the framerate. My artist just built the world way to big, because you are faster with the editors mouse movement. I'll make the demo-cam faster.
Quote:
Just ask if you want some more details...
I ask

Code:
void WVoxelTerrainComponent::DoTrace(D3DXVECTOR3 Start,D3DXVECTOR3 Dir,D3DXVECTOR3* Hit,float* Dist)
{
//Initialise to failure
bool bHit=false;
D3DXVECTOR3 HitLocation=D3DXVECTOR3(0,0,0);
float ChkDist = 0.0f;
for(int steps = 0; steps < 1000; steps++)
{
D3DXVECTOR3 point=Start+(Dir*ChkDist);
PolyVox::Vector3DUint16 v3dPoint = PolyVox::Vector3DUint16(point.x + 0.5, point.y + 0.5, point.z + 0.5);
bool inside = VoxelVolume->getEnclosingRegion().containsPoint(static_cast<Vector3DInt16>(v3dPoint), 2);
if((inside) && (VoxelVolume->getVoxelAt(v3dPoint) != 0))
{
*Hit=point;
*Dist=ChkDist;
return;
}
ChkDist += 1.0f;
}
*Hit=D3DXVECTOR3(0,0,0);
*Dist=-1; //-1 says: no hit
}
This is what I made of your code.And I encountered a problem: It doesn't works!
I converted my Start-position and the Ray direction to object space before, is this correct?
And one more: Do you see any mistakes, I might made?
Quote:
It seems from the docs that that disables range checking on iterators, but I'm not sure that will make much difference to PolyVox. Still a useful tip though

Every unimportant lesser is good in release builds.

This will make every access to things like std::vector faster, because it doesn't checks if it's n valid rage (Which should the application do!)