Does Blitz automatically not draw objects off-screen?
Blitz3D Forums/Blitz3D Beginners Area/Does Blitz automatically not draw objects off-screen?
| ||
If I make a 3d world with 100s or evan 1000s of objects in it, would I have to program my own engine to render only the objects in view or does blitz do this anyway? |
| ||
Im no expert, but I think it keeps control over all the 'visible' entities not hidden with HideEntity command.. that said, blitz does not draw objects not in view, but it manages them.. so if you're going to have alot of objects, you should benefit from some custom hide/show function. Perhaps hide objects far away from the camera? |
| ||
Blitz does entity based frustrum culling. That is, objects offscreen are not rendered. Note however this is done on a per object basis; if any part of an object is onscreen then the entire object is rendered. Thus if your level is a single giant object (for example) the entire level is rendered even if the camera is way off to one side facing out and can only see a single wall. Note also that this has nothing to do with occlusion. Even if an object cannot be seen because it is behind a wall it will still be rendered if it is within the camera view. For complicated scenes you may need to write some sort of culling system. The built-in frustrum culling is just a basic first step in reducing complexity of the scene just to what needs to be drawn. |