problem about x file of animation
problem about x file of animation
How to make the mesh upper body play an animation at the same time lower-body play another animation?
thx.
thx.
You would have to use 2 different scenenodes. In most cases the best solution is to make just more animations so you have one animation for all combinations. This also results generally in better animations (motions usually affect the whole body).
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
thanks!CuteAlien wrote:You would have to use 2 different scenenodes. In most cases the best solution is to make just more animations so you have one animation for all combinations. This also results generally in better animations (motions usually affect the whole body).
2 different scenenodes, I can't understand.
now I have mesh lower-body is run animation. upper body sometime need reload animation,sometime need shooting animation at the same time lower body keep play run animation.
Key is upper body have shooting angle.
Will that do?
-
Lonesome Ducky
- Competition winner
- Posts: 1123
- Joined: Sun Jun 10, 2007 11:14 pm
The way I did this was by casting the meshes with animations in them to CSkinnedMesh, then did the blending manually. You have to change the joint control mode for the mesh you're animating, and set the bone positions manually as the blended position from the CSkinnedMesh-es. Worked fine for me, and there wasn't too much of a slow down.
thx,I'm a beginner. I point don't understandLonesome Ducky wrote:The way I did this was by casting the meshes with animations in them to CSkinnedMesh, then did the blending manually. You have to change the joint control mode for the mesh you're animating, and set the bone positions manually as the blended position from the CSkinnedMesh-es. Worked fine for me, and there wasn't too much of a slow down.
Can write a simple example.
Key code section, order
-
shadowslair
- Posts: 758
- Joined: Mon Mar 31, 2008 3:32 pm
- Location: Bulgaria
This is no excuse. Its like someone who has never build even an outhouse to start building skyscrapers. Beginners should read lots of tutorials, examples etc. and start with more basic stuff. What you wanna do is a bit more for your current skill level. I advise you to work on the easier parts of your project, then soon you`ll get some experience and be able to move to the more advanced stuff.klikli234 wrote:thx,I'm a beginner. I point don't understand
"Although we walk on the ground and step in the mud... our dreams and endeavors reach the immense skies..."
thanks,very muchshadowslair wrote:This is no excuse. Its like someone who has never build even an outhouse to start building skyscrapers. Beginners should read lots of tutorials, examples etc. and start with more basic stuff. What you wanna do is a bit more for your current skill level. I advise you to work on the easier parts of your project, then soon you`ll get some experience and be able to move to the more advanced stuff.klikli234 wrote:thx,I'm a beginner. I point don't understand
Excuse me,I find very long did not find tutorialshadowslair wrote:This is no excuse. Its like someone who has never build even an outhouse to start building skyscrapers. Beginners should read lots of tutorials, examples etc. and start with more basic stuff. What you wanna do is a bit more for your current skill level. I advise you to work on the easier parts of your project, then soon you`ll get some experience and be able to move to the more advanced stuff.klikli234 wrote:thx,I'm a beginner. I point don't understand
I had the same problem with him.
http://irrlicht.sourceforge.net/phpBB2/ ... kinnedmesh
I hope you can give me the tutoria link, or name
Very thank you very much
-
Radikalizm
- Posts: 1215
- Joined: Tue Jan 09, 2007 7:03 pm
- Location: Leuven, Belgium
You can't expect there to be a tutorial for every single problem you're having, what shadowslair meant is that you should read more tutorials about animations, 3D programming and irrlicht so you can solve problems yourself
Thinking and solving problems on your own is not illegal in programming you know
Thinking and solving problems on your own is not illegal in programming you know
thx.Radikalizm wrote:You can't expect there to be a tutorial for every single problem you're having, what shadowslair meant is that you should read more tutorials about animations, 3D programming and irrlicht so you can solve problems yourself
Thinking and solving problems on your own is not illegal in programming you know
I only need example is introduced in ISkinnedMesh usage, document many look not to understand.
My English is very poor, I am using translation software, and before the search keyword all don't know how to write
I think I know how to do it. Put a animation bone into another model skeleton, will there be?
I really can't find tutorial for my problem.
I found several topics are said solve with cskinnedmesh
I try to use 2 node, but there are 2 mesh in my scene.
Please help me, please
I found several topics are said solve with cskinnedmesh
I try to use 2 node, but there are 2 mesh in my scene.
Code: Select all
scene::IAnimatedMeshSceneNode* node = 0;
node = smgr->addAnimatedMeshSceneNode(smgr->getMesh("player/urban-6.x"),0);
node->setPosition(core::vector3df(0,36.f,0)); // Put its feet on the floor.
node->setRotation(core::vector3df(0,-90.f,0)); // And turn it towards the camera.
node->setMaterialFlag(EMF_LIGHTING, false);
node->setAnimationSpeed(30.f);
node->setFrameLoop(46,81);
node->setCurrentFrame(0.f);
node->setLoopMode(true);
//隐藏节点
scene::IAnimatedMeshSceneNode* node2 = 0;
scene::ISkinnedMesh* hidenode = (scene::ISkinnedMesh*)node->getMesh();
hidenode->useAnimationFrom(hidenode);
node2 = smgr->addAnimatedMeshSceneNode(hidenode,0);
node2->setMaterialFlag(EMF_LIGHTING, false);
node2->setAnimationSpeed(30.f);
node2->setFrameLoop(0,45);
node2->setCurrentFrame(10.0f);
node2->setLoopMode(true);What I mean is that you could just use full-body animations for each state. Like "running while looking straight forward" and "running while looking left". Animation data is not using much memory and it's easier to do that stuff in a modeling tool anyway instead of trying to code it. This will get you good results and is done like that in a lot of games.klikli234 wrote:thanks!CuteAlien wrote:You would have to use 2 different scenenodes. In most cases the best solution is to make just more animations so you have one animation for all combinations. This also results generally in better animations (motions usually affect the whole body).
2 different scenenodes, I can't understand.
now I have mesh lower-body is run animation. upper body sometime need reload animation,sometime need shooting animation at the same time lower body keep play run animation.
Key is upper body have shooting angle.
Will that do?
Everything else is complicated and I don't think you can easily do that if you're not really understanding how animation systems do work.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
I kown somethingCuteAlien wrote: What I mean is that you could just use full-body animations for each state. Like "running while looking straight forward" and "running while looking left". Animation data is not using much memory and it's easier to do that stuff in a modeling tool anyway instead of trying to code it. This will get you good results and is done like that in a lot of games.
Everything else is complicated and I don't think you can easily do that if you're not really understanding how animation systems do work.
Code: Select all
node = smgr->addAnimatedMeshSceneNode(smgr->getMesh("player/urban-6.x"),0);
node->setPosition(core::vector3df(0,36.f,0)); // Put its feet on the floor.
node->setRotation(core::vector3df(0,-90.f,0)); // And turn it towards the camera.
node->setMaterialFlag(EMF_LIGHTING, false);
node->setAnimationSpeed(30.f);
node->setFrameLoop(46,81); // reload
node->setCurrentFrame(0.f);
node->setLoopMode(true);
//隐藏节点
scene::IAnimatedMeshSceneNode* node2 = 0;
scene::ISkinnedMesh* hidenode = (scene::ISkinnedMesh*)node->getMesh();
node2 = smgr->addAnimatedMeshSceneNode(hidenode,0);
node2->setMaterialFlag(EMF_LIGHTING, false);
node2->setFrameLoop(0,45); walk
node2->setLoopMode(true);
//骨头节点 Bip01 Spine3
node->setJointMode( irr::scene::EJUOR_CONTROL);
node2->setJointMode( irr::scene::EJUOR_CONTROL);
IBoneSceneNode* bonenode1 = node->getJointNode((irr::c8*)"Bip01_Spine");
IBoneSceneNode* bonenode2 = node->getJointNode((irr::c8*)"Bip01_Spine3");
IBoneSceneNode* bonenode3 = node->getJointNode((irr::c8*)"Bip01_Neck");
IBoneSceneNode* bonenode4 = node2->getJointNode((irr::c8*)"Bip01_Spine");
core::vector3df camrota = camera2->getRotation();
camrota.X = 0.f;
//camrota.Y = 0.f;
//camrota.Z = 0.f;
core::vector3df rotaa = matrixRotation(bonenode2->getRotation(),camrota);
bonenode2->setRotation(core::vector3df(camrota.Y,0.f,0.f));
bonenode4->setRotation(bonenode2->getRotation());
but there do it without ISkinnedMesh.
How do I will animation store to ISkinnedMesh instead of node2
