Page 2 of 2

Posted: Thu Dec 18, 2008 12:15 pm
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.

Posted: Thu Dec 18, 2008 12:58 pm
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!

Posted: Thu Dec 18, 2008 1:02 pm
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

Posted: Thu Dec 18, 2008 1:07 pm
by Daniel FF
thx Hybrid!!! i will try option a) first :)

Posted: Thu Dec 18, 2008 6:03 pm
by Daniel FF
Bad news hybrid :( i did that modification in engine but i still getting that problem.

Posted: Thu Dec 18, 2008 6:38 pm
by Daniel FF
Just to let you know, if camera stays static then problem does not occur.

Posted: Thu Dec 18, 2008 10:16 pm
by hybrid
I have tested your level successfully, with exactly this fix. Can you make a screenshot or video to show what you mean?!

Posted: Fri Dec 19, 2008 11:21 am
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!

Posted: Fri Dec 19, 2008 2:17 pm
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.

Posted: Sat Dec 20, 2008 6:33 pm
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.

Posted: Sat Dec 20, 2008 6:48 pm
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.

Posted: Sat Dec 20, 2008 7:00 pm
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.

Posted: Sat Dec 20, 2008 8:19 pm
by Daniel FF
I think you neeed download svn.

Posted: Sat Dec 20, 2008 9:51 pm
by matgaw
I downloaded SVN 1981 and the problem is gone... meshes aren't disappearing anymore.