I have a problem with meshes disappearing from view when they are still in view. Like when I start moving the camera away from the mesh it can disappear and then reappear - when I think what the engine wants to do is hide it when it goes out of view. I have a custom scene loader and I have tried calling MeshBuffer->setDirty after creating a mesh buffer but it did not help.
Any ideas on what can be causing this?
Meshes disappearing from view too early
Re: Meshes disappearing from view too early
Your bounding box is incorrect.
Re: Meshes disappearing from view too early
Note that you also can have different culling-types. See ISceneNode::setAutomaticCulling which takes one of E_CULLING_TYPE.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
-
motorfreak
- Posts: 21
- Joined: Thu Feb 20, 2014 7:39 pm
Re: Meshes disappearing from view too early
I have had no problem with IMeshSceneNode. It is only the IOctreeSceneNode that culls incorrectly.
Re: Meshes disappearing from view too early
Changing octree settings is unfortunately so far only possible by changing the defines in Octree.h and recompiling the engine.
It's been a while since I used Octree (the places I used it back then were probably better handled by setting meshbuffers to EHC_STATIC instead). But back then I used the following settings:
And before you ask - I would also prefer having the parameters more flexible, having more tests etc - but so far no one volunteered to rework the octree.
It's been a while since I used Octree (the places I used it back then were probably better handled by setting meshbuffers to EHC_STATIC instead). But back then I used the following settings:
Code: Select all
//! use meshbuffer for drawing, enables VBO usage
#define OCTREE_USE_HARDWARE true
//! use visibility information together with VBOs
#define OCTREE_USE_VISIBILITY true
//! use bounding box or frustum for calculate polys
#define OCTREE_BOX_BASED false
//! bypass full invisible/visible test
#define OCTREE_PARENTTEST
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm