how import model correctly for scene management in irredit?
how import model correctly for scene management in irredit?
I use irredit as my scene editor,i import many 3ds model file,but when loading the scene file,FPS is only 8,how import model correctly for scene management?
my systemhybrid wrote:You'd just do it like that. Maybe you should tell us your system specs and the scene parameters (such as face count) in order to assess the frame rate. BTW: Did you check this in release mode, or debug mode?
celeron (M) 1.5G,512M memory,
Irrlicht Engine version 1.5
Microsoft Windows XP Professional Service Pack 3 (Build 2600)
Using renderer: Direct3D 9.0,ATI MOBILITY RADEON 9600/9700 Series,
i use the code
Code: Select all
driver->getPrimitiveCountDrawn()
visual studio 2005, win32 console application.
-
- Admin
- Posts: 14143
- Joined: Wed Apr 19, 2006 9:20 pm
- Location: Oldenburg(Oldb), Germany
- Contact:
Ok, so I assume it's a debug version, because that's the default setting in the project files. frame rate can vary by a factor of 10 when changing to release mode. For your scene please also specify the number of scene nodes (you load) and the number of materials each node has.
However, as long as you don't use VBOs, a polycount of 100k is maximum you can have with usual systems. Everything above will require far too much bandwidth and overhead.
Try this: For each node you create call node->setHardwareMappingHint(scene::EHM_STATIC)
However, as long as you don't use VBOs, a polycount of 100k is maximum you can have with usual systems. Everything above will require far too much bandwidth and overhead.
Try this: For each node you create call node->setHardwareMappingHint(scene::EHM_STATIC)
hybrid wrote:Ok, so I assume it's a debug version, because that's the default setting in the project files. frame rate can vary by a factor of 10 when changing to release mode. For your scene please also specify the number of scene nodes (you load) and the number of materials each node has.
However, as long as you don't use VBOs, a polycount of 100k is maximum you can have with usual systems. Everything above will require far too much bandwidth and overhead.
Try this: For each node you create call node->setHardwareMappingHint(scene::EHM_STATIC)
Code: Select all
for (u32 i=0; i < nodes.size(); ++i)
{
scene::ISceneNode * node = nodes[i];
switch(node->getType())
{
case scene::ESNT_SKY_BOX:
break;
case scene::ESNT_EMPTY:
m_fInitialPositon = node->getAbsolutePosition();
break;
case scene::ESNT_ANIMATED_MESH:
Selector = pManager->getSceneManager()->createTriangleSelectorFromBoundingBox(node);
break;
case scene::ESNT_MESH:
Selector = pManager->getSceneManager()->createTriangleSelector(((scene::IMeshSceneNode*)node)->getMesh(), node);
node->setHardwareMappingHint(scene::EHM_STATIC);
break;
case scene::ESNT_TERRAIN:
Selector = pManager->getSceneManager()->createTerrainTriangleSelector((scene::ITerrainSceneNode*)node);
node->setHardwareMappingHint(scene::EHM_STATIC);
break;
default:
break;
}
if (Selector)
{
pManager->getMetaSelector()->addTriangleSelector(Selector);
Selector->drop();
}
}
sorry,Can you say more detail?For your scene please also specify the number of scene nodes (you load) and the number of materials each node has
i change the camera farvalue from 20000 to 2000,and use release mode,but There is no change in performance.
i counted about 170 node in irredit i load .512*512 heightmap
Last edited by superpop on Thu Apr 23, 2009 2:34 pm, edited 1 time in total.
-
- Admin
- Posts: 14143
- Joined: Wed Apr 19, 2006 9:20 pm
- Location: Oldenburg(Oldb), Germany
- Contact:
Sorry, should be mesh, not scene node to call this method for. You should also call it for animated meshes, at least if it's a 3ds mesh (since that's non-animated even though it's using the animated mesh structure).
Changing the far value won't help if the app is fill-rate limited or CPU-limited (I suspect the latter). 170 scene nodes should be manageable, though you could start thinking about a zone concept.
Changing the far value won't help if the app is fill-rate limited or CPU-limited (I suspect the latter). 170 scene nodes should be manageable, though you could start thinking about a zone concept.
I use the following method for load scene,i do it in accordance with the example of irrlicht,In addition, for the loading of the scene node, I did not do anything.i search the ISceneNode.h,if know the node,there is no method for get mesh.
about why my game fps is only 5,i asked in irredit forum,the reply is :
Code: Select all
loadIrrScene(CGameManager* pManager,const c8* irrFileName)
{
pManager->getSceneManager()->loadScene(irrFileName);
pManager->setMetaSelector();
core::array<scene::ISceneNode *> nodes;
pManager->getSceneManager()->getSceneNodesFromType(scene::ESNT_ANY, nodes); // Find all nodes
for (u32 i=0; i < nodes.size(); ++i)
{
scene::ISceneNode * node = nodes[i];
switch(node->getType())
{
case scene::ESNT_SKY_BOX:
break;
case scene::ESNT_EMPTY:
m_fInitialPositon = node->getAbsolutePosition();
break;
case scene::ESNT_ANIMATED_MESH:
Selector = pManager->getSceneManager()->createTriangleSelectorFromBoundingBox(node);
break;
case scene::ESNT_MESH:
Selector = pManager->getSceneManager()->createTriangleSelector(((scene::IMeshSceneNode*)node)->getMesh(), node);
break;
case scene::ESNT_TERRAIN:
Selector = pManager->getSceneManager()->createTerrainTriangleSelector((scene::ITerrainSceneNode*)node);
break;
default:
break;
}
if (Selector)
{
pManager->getMetaSelector()->addTriangleSelector(Selector);
Selector->drop();
}
}
}
how can i do this?170 scene nodes should be manageable, though you could start thinking about a zone concept.
about why my game fps is only 5,i asked in irredit forum,the reply is :
I do not think this is a good solution.merge my files together into one large single one