[fixed]Meshes disappearing

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Ok, just tested the app (under Linux, hence it took a little longer). The problem is that your b3d files don't set the mipmap flag, and are hence loaded with mipmaps disabled. That leads to unpleasant effects. I guess we need an override, as this flag seems to be missing in many files.
But even with that flag fixed you also need antialiasing, otherwise the borders on the houses are really jerky.
Daniel FF
Posts: 53
Joined: Tue Feb 19, 2008 7:15 pm

Post by Daniel FF »

Is there a way to set the flag in the engine ? or just in the exporter, iam a litle confuse cuz mipmap is related with textures, rigth ? but problem happens with EMF_WIREFRAME too

thx!
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Wireframe textures the wires still. The flag is set inside the b3d meshes, so there's no way around right now besides
a) fixing the mesh exporter or setting the mipmap flag there
b) change the engine code by disabling
SceneManager->getVideoDriver()->setTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS, (B3dTexture->Flags & 0x8) ? true:false);
in CB3dMeshFileLoader.cpp
Daniel FF
Posts: 53
Joined: Tue Feb 19, 2008 7:15 pm

Post by Daniel FF »

thx Hybrid!!! i will try option a) first :)
Daniel FF
Posts: 53
Joined: Tue Feb 19, 2008 7:15 pm

Post by Daniel FF »

Bad news hybrid :( i did that modification in engine but i still getting that problem.
Daniel FF
Posts: 53
Joined: Tue Feb 19, 2008 7:15 pm

Post by Daniel FF »

Just to let you know, if camera stays static then problem does not occur.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

I have tested your level successfully, with exactly this fix. Can you make a screenshot or video to show what you mean?!
Daniel FF
Posts: 53
Joined: Tue Feb 19, 2008 7:15 pm

Post by Daniel FF »

Hi,

I tested levels textured and problem looks minimized, u can only see in some borders, is it AntiAlias ? i think my card dont support that flag cuz dont make any difference. Anyway, i will test in a better card and if i still get the problem i will post a video, ok ??

Thx!
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Ok, if the major pixelation is removed, and only the borders of the house and the door are moving now, then it's the antialiasing problem. You might get around this with trilinear or anisotropic filtering as well, I didn't check that, yet.
matgaw
Posts: 45
Joined: Sat Oct 06, 2007 11:33 am

Post by matgaw »

Same problem here. Meshes disappearing when created with addOctTreeSceneNode, no matter if culling is default or EAC_FRUSTUM_BOX.

If I change addOctTreeSceneNode to addMeshSceneNode - and use the default culling instead of frustum - problem disappears.
rogerborg
Admin
Posts: 3590
Joined: Mon Oct 09, 2006 9:36 am
Location: Scotland - gonnae no slag aff mah Engleesh
Contact:

Post by rogerborg »

What version of Irrlicht, what model (can we have a copy?) what camera, setup, yadda yadda. Come on, chumrade, help us to help you.
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
matgaw
Posts: 45
Joined: Sat Oct 06, 2007 11:33 am

Post by matgaw »

Irrlicht 1.5 of course, standard camera, DirectX9, GCC 3.4.2 under MinGW.

Creation code:

Code: Select all

Mesh=device->getSceneManager()->getMesh(file.c_str())->getMesh(0);
    Node=device->getSceneManager()->addOctTreeSceneNode(Mesh,0,BuildingID);
    Node->setMaterialFlag(EMF_LIGHTING,false);
    Node->setMaterialFlag(EMF_FOG_ENABLE,true);
    Node->setPosition(savedPosition);
    Node->setRotation(savedRotation);
    Node->setScale(vector3df(savedScale,savedScale,savedScale));
Some model to test: click

Just load it on the scene as octTreeSceneNode, set some position, rotation and scale, and just go around the model changing the rotation of the camera - it will disappear very frequently. The same with all models I use.

Changing it to meshSceneNode fixes the problem.

In Irrlicht 1.4.2 everything was fine if I also set automatic culling to frustum box. Now it doesn't help anymore.
Daniel FF
Posts: 53
Joined: Tue Feb 19, 2008 7:15 pm

Post by Daniel FF »

I think you neeed download svn.
matgaw
Posts: 45
Joined: Sat Oct 06, 2007 11:33 am

Post by matgaw »

I downloaded SVN 1981 and the problem is gone... meshes aren't disappearing anymore.
Post Reply