many objects in irrlicht

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

No, this was a suggestion for the specific situation of xirtamatrix. for your case, you should read up the other blockworld implementations and suggestions there. It's basically complex index hanlding what you want to do. At least that's what I'd use.
irrman
Posts: 10
Joined: Wed Apr 13, 2011 9:18 am

Post by irrman »

hybrid wrote:No, this was a suggestion for the specific situation of xirtamatrix. for your case, you should read up the other blockworld implementations and suggestions there. It's basically complex index hanlding what you want to do. At least that's what I'd use.
Can you tell me about this in more detail? (link or other please)
(Im not understand you) :(
irrman
Posts: 10
Joined: Wed Apr 13, 2011 9:18 am

Post by irrman »

Can help me Shader Instancing?
xirtamatrix
Posts: 219
Joined: Fri Feb 19, 2010 4:03 pm
Location: Estonia

Post by xirtamatrix »

hybrid wrote:octree won't help you either, as it only works for huge meshes (in terms of dimensions). What could help is hardware buffers. You should set the hardware mapping hint to EHM_STATIC on all meshes, and probably also reduce the minimum hw buffer size (IIRC, it's a video driver setting) to some very low value (around 20 maybe). This should reduce your memory bandwidth usage a lot, which can definitely help on low-end machines. Moreover, you could batch arbitary meshes, or meshes nearby each other, in order to reduce the scene manager overhead. This usually helps, but should be tested on low-end machines.
@irrman Sorry to have hijacked your thread, but since the topic&problem was same I thought it better to not start another one.

@hybrid I just tried it out and it seems to be having no effect what-so-ever. The fps stays exactly as it was before. I'm doing it as follows:

Code: Select all


scene::IAnimatedMesh* mesh;
	if(! (mesh=smgr->getMesh(meshFilePath)))
	{
		//display error and return				return 0;
	}

	mesh->getMesh(0)->setHardwareMappingHint(EHM_STATIC);
Is this the right way to do it?
Also, later on I'm creating a tanget-mesh from this mesh, could that be the reason hardware mapping hint is having no effect?

/regards
to live, is natural; to die, is not!
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

The tangent mesh creation might or might not copy that flag. Just check it. But you also need to reduce the number of vertices with which the static buffer starts to work. Default is at 500 IIRC, so your meshes with about 100 vertices won't use the vbos at all.
xirtamatrix
Posts: 219
Joined: Fri Feb 19, 2010 4:03 pm
Location: Estonia

Post by xirtamatrix »

hybrid wrote:The tangent mesh creation might or might not copy that flag. Just check it. But you also need to reduce the number of vertices with which the static buffer starts to work. Default is at 500 IIRC, so your meshes with about 100 vertices won't use the vbos at all.
Yeps, did that as well with

Code: Select all

driver->setMinHardwareBufferVertexCount(20);
but no difference in fps at all. Just to test, I increased the value to 2000 and ran the application, still no difference. Then droped it to 2, still no difference. Then I removed the whole tanget-mesh creation, and tested again with 20, still fps is exactly same.

Could this be hardware related? Perhaps the on-board display adaptor on this machine is simply incapable of using hardware buffers or something like this. DxDiag tells me its a Intel(R) 82945G Express Chipset with 128MB memory. Provides Direct3D acceleration but no AGP texture acceleration.
to live, is natural; to die, is not!
Lonesome Ducky
Competition winner
Posts: 1123
Joined: Sun Jun 10, 2007 11:14 pm

Post by Lonesome Ducky »

To irrman, I think you should first try batching some of the cubes. This will be a much more significant speed increase.
irrman
Posts: 10
Joined: Wed Apr 13, 2011 9:18 am

Post by irrman »

Lonesome Ducky wrote:To irrman, I think you should first try batching some of the cubes. This will be a much more significant speed increase.
What is better: CMeshCombiner or CBatchingMesh?
Post Reply