# Does OGRE do hardware skinning by default?

I am trying to understand how OGRE works at a lower level, and from what I have read so far, I believe OGRE generates shaders from material scripts using its RTShader system, on the loading of each scene (based on the contents).

My questions are:

1. Is this correct? (i.e. does OGRE 1.7.1 by default generate shaders at runtime by default?)

2. If 'yes', do the generated shaders support hardware skeletal animation by default?

3. In either case, if 'yes' to (1), when I extend a material script specifying a fragment program, is this incorporated into the generated script or does it completely replace it?

EDIT:

OK, so I got PIX to debug a scene with a model with skeletal animation, and it turns out the fixed-function pipeline was in use (no vertex or pixel shaders were available for PIX to debug even as assembly).

I then looked with the debugger for the properties referenced in the skeletal animation example file SkeletalAnimation.h:

    // change the value if hardware skinning is enabled
Pass* pass = ent->getSubEntity(0)->getMaterial()->getBestTechnique()->getPass(0);
if (pass->hasVertexProgram() && pass->getVertexProgram()->isSkeletalAnimationIncluded()) value = "Hardware";


And found that there was no vertex or fragment program to speak of, hence I can assume the answer to (2) at least is 'no'.

Looking further at OGRE's documentation it seems I can combine shaders with the FFP, but only replacing specific stages. (i.e. I can't use the FFP vertex processing and then add a vertex shader)

I am still unsure though about RTShader: Is it an established part of OGRE, or still in development? Do I have to turn it on? Or do I have to invoke it manually?

• My best bet is that it is sort of 50 / 50. The calculations of bones would be in software so you can "attach something" to a bone (say the RPG sword to the hand) the rest I don't know, are there examples with like hundreds of characters running at a high framerate (that would probably mean a shader)? I use Irrlicht and I had to code my skin mesh shader by myself which actually is kind of complicated. – Valmond Sep 19 '11 at 19:43
• Have you tried asking at the Ogre3D forums? Last time I visited the main contributors were really nice if you have a well formed question like this, and their answers are right on. – Patrick Hughes Sep 20 '11 at 2:17
• @Valmond, I am sure there are - OGRE has three scene managers, for different types. I know OGRE supports automatic binding of transforms to shaders (i.e. you write the shader and say "this supports hardware animation" and OGRE sorts out passing the transforms to the GPU so you don't have to get your hands dirty packing buffers ;). However, as you say, shaders aren't simple. I have written shaders supporting animation but part of using a rendering engine is not having to do low level lighting, shadows, etc. – sebf Sep 20 '11 at 18:26
• @Patrick, I did ask but havn't received a response yet. The OGRE forums seem excellent from what I've seen, part of why I choose to try it, and I would hope that the Q. is very simple for someone who knows the engine well, so I can only assume it disappeared too fast or I have made some egregious assumption that has offended them ;). Though in seriousness with a project as mature as OGRE I can understand the experienced users not having great tolerance for new users Qs: like someone asking how to underline on the Word forum - except they aren't being paid to answer! – sebf Sep 20 '11 at 18:26