Posted: Thu Jun 02, 2011 1:33 pm
What?mongoose7 wrote:OGRE looks as if it has an animation system, whereas Irrlicht hasn't.
Official forum of the Irrlicht Engine
https://irrlicht.sourceforge.io/forum/
What?mongoose7 wrote:OGRE looks as if it has an animation system, whereas Irrlicht hasn't.
Actually only 16 of the 34 demos provided with ogre use shaders and some of those don't change appearance, only performance (eg. hardware skinning and instancing). The rest are fixed function.All Ogre demos are fully using shaders while most of the irrlicht demos are just using fixed-function materials that is why the difference is so huge.
Mongoose7, Irrlicht has an animation system!Radikalizm wrote:What?mongoose7 wrote:OGRE looks as if it has an animation system, whereas Irrlicht hasn't.
You still can use the animation from a skinned mesh on other skinned mesh given they have the same skeleton.That is, in Irrlicht, you do all your animation outside Irrlicht and then load it. Even Horde3d has animation separate from models. Ogre3d seems to have the capability of procedural animation.
Code: Select all
while (tracks.hasMoreElements()) // for every node track...
{
NodeAnimationTrack* track = tracks.getNext();
// get the keyframe at the chopping point
TransformKeyFrame oldKf(0, 0);
track->getInterpolatedKeyFrame(ANIM_CHOP, &oldKf);
// drop all keyframes after the chopping point
while (track->getKeyFrame(track->getNumKeyFrames()-1)->getTime() >= ANIM_CHOP - 0.3f)
track->removeKeyFrame(track->getNumKeyFrames()-1);
// create a new keyframe at chopping point, and get the first keyframe
TransformKeyFrame* newKf = track->createNodeKeyFrame(ANIM_CHOP);
TransformKeyFrame* startKf = track->getNodeKeyFrame(0);
Bone* bone = skel->getBone(track->getHandle());
if (bone->getName() == "Spineroot") // adjust spine root relative to new location
{
mSneakStartPos = startKf->getTranslate() + bone->getInitialPosition();
mSneakEndPos = oldKf.getTranslate() + bone->getInitialPosition();
mSneakStartPos.y = mSneakEndPos.y;
newKf->setTranslate(oldKf.getTranslate());
newKf->setRotation(oldKf.getRotation());
newKf->setScale(oldKf.getScale());
}
else // make all other bones loop back
{
newKf->setTranslate(startKf->getTranslate());
newKf->setRotation(startKf->getRotation());
newKf->setScale(startKf->getScale());
}
}
Code: Select all
When using shadows (See section 7. Shadows), the use of vertex programs can add some additional complexities, because Ogre can only automatically deal with everything when using the fixed-function pipeline. If you use vertex programs, and you are also using shadows, you may need to make some adjustments.
If you use stencil shadows, then any vertex programs which do vertex deformation can be a problem, because stencil shadows are calculated on the CPU, which does not have access to the modified vertices. If the vertex program is doing standard skeletal animation, this is ok (see section above) because Ogre knows how to replicate the effect in software, but any other vertex deformation cannot be replicated, and you will either have to accept that the shadow will not reflect this deformation, or you should turn off shadows for that object.
If you use texture shadows, then vertex deformation is acceptable; however, when rendering the object into the shadow texture (the shadow caster pass), the shadow has to be rendered in a solid colour (linked to the ambient colour). You must therefore provide an alternative vertex program, so Ogre provides you with a way of specifying one to use when rendering the caster. Basically you link an alternative vertex program, using exactly the same syntax as the original vertex program link:
Hm, I used it so far in a (released) racing game, in a VR (still in work) and I'm working for an architecture company using Irrlicht. And I hope to do more projects in the future.Kalango wrote:What is Irrlicht being used for?