hello,
i have built a simple scene with a flat plane and some boxes.
the boxes are controlled via a physics engine (pal with bullet).
when they fall to the ground, some of these boxes start to flicker - even
when they are motionless. in my example there are 500 boxes and approx.
10-20 boxes are flickering. and there is just another effect: if i look around
with the camera controlled with the mouse, often the boxes at the screen-borders start to flicker or just disappear. this effect is less if i set the gravity
from 10 to 1, so that all action is very slow. may this be a rendering issue?
regards,
clemens
render problem?
if this is a zbuffer problem, how to solve? i have set up the
graphics device with 32 bits instead of 16 - same issue.
i have changed the physics engine from bullet to newton - same issue.
i have disabled pal and worked directly with bullet to see if its a pal problem - boxes still start to flicker.
what i can see is, that if i turn the camera around a flickering box it stops this behavior sometimes when i change the way i look at it. if it is located in the center of my view it disappears - if it is located under the center it is visible. i can repeat this endless for this object.
is this maybe due to the camera-viewmatrix? i have already tried to change the near-far clipping plane with no result. maybe the aspect-ratio?
any hints?
graphics device with 32 bits instead of 16 - same issue.
i have changed the physics engine from bullet to newton - same issue.
i have disabled pal and worked directly with bullet to see if its a pal problem - boxes still start to flicker.
what i can see is, that if i turn the camera around a flickering box it stops this behavior sometimes when i change the way i look at it. if it is located in the center of my view it disappears - if it is located under the center it is visible. i can repeat this endless for this object.
is this maybe due to the camera-viewmatrix? i have already tried to change the near-far clipping plane with no result. maybe the aspect-ratio?
any hints?
maybe a culling problem (node->setAutomaticCulling) ???
but this shouldn't if the box is in the center of the screen, except if it's a bounding box problem (try node->setDebugDataVisible)...
if nothing works, make a download or post code that reproduces the error so we can check it...![Wink ;)](./images/smilies/icon_wink.gif)
but this shouldn't if the box is in the center of the screen, except if it's a bounding box problem (try node->setDebugDataVisible)...
if nothing works, make a download or post code that reproduces the error so we can check it...
![Wink ;)](./images/smilies/icon_wink.gif)
while(!asleep) sheep++;
IrrExtensions:![Image](http://abusoft.g0dsoft.com/Irrlicht/gfx/logo.jpg)
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
IrrExtensions:
![Image](http://abusoft.g0dsoft.com/Irrlicht/gfx/logo.jpg)
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
-
- Posts: 1638
- Joined: Mon Apr 30, 2007 3:24 am
- Location: Montreal, CANADA
- Contact:
I don't know much things with physic engines, but have you checked this?:
- Pausing the simulation, to see if the physic engine was not forgetting some objects from frame to frame.
- Tryied with variants of the number of boxes (start with 10, 20, 30, and so on)
- Checked when the RENDER is done from the physic engine, could be out of sync with the IRRlicht begin scene and endscene commands.
Culling distance would be a good thing to check also as mentionned by Acki.
- Pausing the simulation, to see if the physic engine was not forgetting some objects from frame to frame.
- Tryied with variants of the number of boxes (start with 10, 20, 30, and so on)
- Checked when the RENDER is done from the physic engine, could be out of sync with the IRRlicht begin scene and endscene commands.
Culling distance would be a good thing to check also as mentionned by Acki.
ok. i tried the following proposals from Acki and Christian (thanks!):
-changed the number of boxes - flickering/disappearing starts approx. > 70 boxes
-same thing if i stop physics calculation/updating box-position/rotation
-tried out node->setAutomaticCulling() with EAC_OFF, EAC_BOX and EAC_FRUSTUM_BOX - but its always the same effect
so this is not due to the physics engine, i think. but i have seen another interesting thing: at program start i place all boxes at a grid position and stack some layers of 7x7 boxes so that i have 7x7x e.g.10 = 749 boxes. they are floating in the air until the application starts and the physics engine adds the gravity. if i stop physics, so that the boxes stand still - there is no flickering except at the screen-borders. if i turn around, i can see this effect always at the borders - lines of boxes disappear at once. if i let all boxes fall to the ground so that they are cluttered, this effect can be seen everywhere on the screen - not just at the borders.
by the way, this happens in opengl- and also directx-mode.
which issues do i have to look for if i set the setDebugDataVisible-method? maybe there are some useful informations - as Acki suggested?
-changed the number of boxes - flickering/disappearing starts approx. > 70 boxes
-same thing if i stop physics calculation/updating box-position/rotation
-tried out node->setAutomaticCulling() with EAC_OFF, EAC_BOX and EAC_FRUSTUM_BOX - but its always the same effect
so this is not due to the physics engine, i think. but i have seen another interesting thing: at program start i place all boxes at a grid position and stack some layers of 7x7 boxes so that i have 7x7x e.g.10 = 749 boxes. they are floating in the air until the application starts and the physics engine adds the gravity. if i stop physics, so that the boxes stand still - there is no flickering except at the screen-borders. if i turn around, i can see this effect always at the borders - lines of boxes disappear at once. if i let all boxes fall to the ground so that they are cluttered, this effect can be seen everywhere on the screen - not just at the borders.
by the way, this happens in opengl- and also directx-mode.
which issues do i have to look for if i set the setDebugDataVisible-method? maybe there are some useful informations - as Acki suggested?
mainly I thought using it to check if the bounding boxes are correct (for culling)...clemens wrote:which issues do i have to look for if i set the setDebugDataVisible-method? maybe there are some useful informations - as Acki suggested?
![Wink ;)](./images/smilies/icon_wink.gif)
while(!asleep) sheep++;
IrrExtensions:![Image](http://abusoft.g0dsoft.com/Irrlicht/gfx/logo.jpg)
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
IrrExtensions:
![Image](http://abusoft.g0dsoft.com/Irrlicht/gfx/logo.jpg)
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
SOLVED
i 've got it!
until now i have created all objects with mSmgr->addOctTreeSceneNode() because the code documentation says "a good method for rendering scenes with lots of geometry".
i simply replaced this by mSmgr->addMeshSceneNode() - and the flickering is gone! ! !
i go now and play a bit with stacks...
thank you all for your proposals! good to know that people offer help here.
until now i have created all objects with mSmgr->addOctTreeSceneNode() because the code documentation says "a good method for rendering scenes with lots of geometry".
i simply replaced this by mSmgr->addMeshSceneNode() - and the flickering is gone! ! !
![Very Happy :D](./images/smilies/icon_biggrin.gif)
i go now and play a bit with stacks...
![Wink :wink:](./images/smilies/icon_wink.gif)
thank you all for your proposals! good to know that people offer help here.