I'm thinking of using a 1 unit = 1 meter scale in my scene because I've noticed that irrlicht starts to have problems with really huge scenes, and I want to have a pretty big one. I want to know what problems I might have with this, as it seems kind of small. According to this topic, the main problem seems to be z-fighting. Can I control this entirely my changing the near plane, or are there other factors? Are there any other problems that might arise from a really tiny scene?
Thanks for your time.
Scene Scale and Z-fighting
It is possible that disabling the stencil buffer when creating the Irrlicht device will leave more precision for the zbuffer, but that also means you can't use stencil shadows.Can I control this entirely my changing the near plane, or are there other factors?
When that is not enough, you can, in theory, render your scene in two passes like this:
Code: Select all
driver->beginScene(...);
// Draw distant objects
camera->setNearValue(50000.0f);
camera->setFarValue(100000.0f);
manager->drawAll();
// Draw near objects
driver->clearZBuffer();
camera->setNearValue(0.01f);
camera->setFarValue(50000.0f);
// TODO: Set skybox invisible here
manager->drawAll();
driver->endScene();