Hi,
i'm getting some performance issues and therefore i have some questions.
I have relative high-detailled meshes (ca. 8000 - 15000 triangles) with skeletons besides some lower detailed models.
1)
is there a FAQ-Page where i could look up some performance "benchmark" values, such as maximum triangle count (mesh & scene), skeleton (count of bones), fps, etc.
2)
AND/OR:
Can somebody tell me what is the greater bottleneck for performance: triangle count OR Skeleton.
It seems to me that the main issue is the triangle count which also plays a role for the skeleton.
Therefore i really need to know the some "limitation/benchmark values" of the engine.
3)
Another issue i'm wondering about is, why the performance for the same scene is identical if the meshes with skeletons, are animated or not?
mfg
Shinobi
Mesh vs. Skeleton vs. Performance
- Shinobi
- Kobold
- Posts: 27
- Joined: Thu Dec 16, 2004 5:01 pm
- Contact:
- sinbad
- OGRE Retired Team Member

- Posts: 19269
- Joined: Sun Oct 06, 2002 11:19 pm
- Location: Guernsey, Channel Islands
- x 67
- Contact:
If you're using high-poly meshes you really must use hardware skinning, which means using a vertex programl we supply some examples in the Samples\Media\materials\programs area. Software skinning is just not efficient on large meshes both because of the number of vertices being calculated, and the performance hit on the GPU as that updated data gets uploaded every frame.
There is no 'max' poly count, just tradeoffs. As for bones, that depends on what vertex program profile you aim for. Since each bone requires 3 program constants (for a 3x4 matrix), you have to calculate your max bones based on the profile you're trying to fit within - with the lowest (vs_1_1) you pretty much hit a brick wall at 24 bones. More advanced profiles can handle more bones.
There is no 'max' poly count, just tradeoffs. As for bones, that depends on what vertex program profile you aim for. Since each bone requires 3 program constants (for a 3x4 matrix), you have to calculate your max bones based on the profile you're trying to fit within - with the lowest (vs_1_1) you pretty much hit a brick wall at 24 bones. More advanced profiles can handle more bones.
-
thorgrim
- Gnoblar
- Posts: 17
- Joined: Thu Oct 16, 2003 9:37 pm
Hi,
I was trying with a more advanced profile for a mesh with 33 bones and 4 weights. The animation was done properly, however the mesh disappear and reappear from time to time.
Could it be that the params viewProjectionMatrix get invalid values due to the extra bones?
As when I switched back to software skinning, everything goes well!
I was trying with a more advanced profile for a mesh with 33 bones and 4 weights. The animation was done properly, however the mesh disappear and reappear from time to time.
Could it be that the params viewProjectionMatrix get invalid values due to the extra bones?
As when I switched back to software skinning, everything goes well!
- sinbad
- OGRE Retired Team Member

- Posts: 19269
- Joined: Sun Oct 06, 2002 11:19 pm
- Location: Guernsey, Channel Islands
- x 67
- Contact:
The vertex program can't affect the frustrum culling. Are you sure the mesh was in the right place when you had hardware skinning on? Perhaps it wasn't quite working properly so the bounding box was elsewhere. Try enabling bounding boxes (SceneManager::showBoundingBoxes) to see, if the mesh isn't in the bounding box when hardware skinning is enabled then the vertex program isn't quite right.
-
thorgrim
- Gnoblar
- Posts: 17
- Joined: Thu Oct 16, 2003 9:37 pm
Bounding box
Hi,
You have right!
When i enable the bounding box, i saw that they are not relevant at all!
With the robot, everything is fine. However, when i try to use the program with four bones, I am getting thoses issues (like with the ninja.mesh). I am wondering if the fourWeights program was really working.
for instance, if i have only one character (from the skeletal demo) with the fourweights, then i am getting a "huge" bounding box but valid. With two character, I am getting three bounding box, and one of the two meshes is between them.
Then if i add even more meshes the second row have all their bounding boxes set too far. Like one row of characters, then next one if BB, then characters, then...... like a shift .
You have right!
When i enable the bounding box, i saw that they are not relevant at all!
With the robot, everything is fine. However, when i try to use the program with four bones, I am getting thoses issues (like with the ninja.mesh). I am wondering if the fourWeights program was really working.
for instance, if i have only one character (from the skeletal demo) with the fourweights, then i am getting a "huge" bounding box but valid. With two character, I am getting three bounding box, and one of the two meshes is between them.
Then if i add even more meshes the second row have all their bounding boxes set too far. Like one row of characters, then next one if BB, then characters, then...... like a shift .
- sinbad
- OGRE Retired Team Member

- Posts: 19269
- Joined: Sun Oct 06, 2002 11:19 pm
- Location: Guernsey, Channel Islands
- x 67
- Contact:
- Shinobi
- Kobold
- Posts: 27
- Joined: Thu Dec 16, 2004 5:01 pm
- Contact:
Thanks Sinbad for the tip with the hardware skinning. That has done the trick with the performance.
Now I've got some problems with the programming of the scripts and programs.
I don't seem to get a spherical reflection map working and some minor lighting problems.
Does somebody can tell me the solution or a link to some general scripts/programs and/or tutorials (with explanations) to shader scripts/programs.
thx in advance,
Shinobi
Now I've got some problems with the programming of the scripts and programs.
I don't seem to get a spherical reflection map working and some minor lighting problems.
Does somebody can tell me the solution or a link to some general scripts/programs and/or tutorials (with explanations) to shader scripts/programs.
thx in advance,
Shinobi
-
thorgrim
- Gnoblar
- Posts: 17
- Joined: Thu Oct 16, 2003 9:37 pm
Its working
Hi Sinbad,
I manage to find the bug within the fourweight program
the blendPos was initiallize with the following values
float4 blendPos = float4(0,0,0,1);
However after the for loop
for (i = 0; i < 4; ++i)
{
blendPos += float4(mul(worldMatrix3x4Array[blendIdx], position).xyz, 1.0) * blendWgt;
}
blendPos.w was 2.0 (instead of 1.0), making the mess.
To resolve the issue, just replace the constructor by this one
// transform by indexed matrix
float4 blendPos = float4(0,0,0,0);
As you can see, one small number make all the difference
I can't try my 33 bones models yet (they are located on some other computer), but with the ninja (which is already over the 24 bones limits), I manage to run (with the demo_skeletal) 100 walking ninja with a solid 66FPS using of course a profile 2_0
It will be interesting to see my models with hardware skinning (as it make a huge speed-up with "big" vertex number, it this case from 25 to 66FPS).
Thanks for your advice!
I manage to find the bug within the fourweight program
the blendPos was initiallize with the following values
float4 blendPos = float4(0,0,0,1);
However after the for loop
for (i = 0; i < 4; ++i)
{
blendPos += float4(mul(worldMatrix3x4Array[blendIdx], position).xyz, 1.0) * blendWgt;
}
blendPos.w was 2.0 (instead of 1.0), making the mess.
To resolve the issue, just replace the constructor by this one
// transform by indexed matrix
float4 blendPos = float4(0,0,0,0);
As you can see, one small number make all the difference
I can't try my 33 bones models yet (they are located on some other computer), but with the ninja (which is already over the 24 bones limits), I manage to run (with the demo_skeletal) 100 walking ninja with a solid 66FPS using of course a profile 2_0
It will be interesting to see my models with hardware skinning (as it make a huge speed-up with "big" vertex number, it this case from 25 to 66FPS).
Thanks for your advice!
- sinbad
- OGRE Retired Team Member

- Posts: 19269
- Joined: Sun Oct 06, 2002 11:19 pm
- Location: Guernsey, Channel Islands
- x 67
- Contact: