[fixed]Meshes disappearing
-
- Admin
- Posts: 14143
- Joined: Wed Apr 19, 2006 9:20 pm
- Location: Oldenburg(Oldb), Germany
- Contact:
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.
But even with that flag fixed you also need antialiasing, otherwise the borders on the houses are really jerky.
-
- Admin
- Posts: 14143
- Joined: Wed Apr 19, 2006 9:20 pm
- Location: Oldenburg(Oldb), Germany
- Contact:
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
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
-
- Admin
- Posts: 3590
- Joined: Mon Oct 09, 2006 9:36 am
- Location: Scotland - gonnae no slag aff mah Engleesh
- Contact:
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
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
Irrlicht 1.5 of course, standard camera, DirectX9, GCC 3.4.2 under MinGW.
Creation code:
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.
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));
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.