skeletal human animations [UPDATED]

Post those lines of code you feel like sharing or find what you require for your project here; or simply use them as tutorials.
kulanuja
Posts: 20
Joined: Sat Jun 14, 2008 11:10 am

Post by kulanuja »

I am getting the following error when I tried to complie your animatin project

Code: Select all

1>------ Rebuild All started: Project: anim16, Configuration: Debug Win32 ------
1>Deleting intermediate and output files for project 'anim16', configuration 'Debug|Win32'
1>Compiling...
1>main.cpp
1>e:\sussex\dissertation\irrlicht\irrlicht-1.4.1\examples\anim16\main.cpp(66) : warning C4305: 'argument' : truncation from 'double' to 'irr::f32'
1>e:\sussex\dissertation\irrlicht\irrlicht-1.4.1\examples\anim16\main.cpp(66) : warning C4305: 'argument' : truncation from 'double' to 'irr::f32'
1>e:\sussex\dissertation\irrlicht\irrlicht-1.4.1\examples\anim16\main.cpp(66) : warning C4305: 'argument' : truncation from 'double' to 'irr::f32'
1>e:\sussex\dissertation\irrlicht\irrlicht-1.4.1\examples\anim16\main.cpp(67) : warning C4305: 'argument' : truncation from 'double' to 'irr::f32'
1>e:\sussex\dissertation\irrlicht\irrlicht-1.4.1\examples\anim16\main.cpp(67) : warning C4305: 'argument' : truncation from 'double' to 'irr::f32'
1>e:\sussex\dissertation\irrlicht\irrlicht-1.4.1\examples\anim16\main.cpp(78) : warning C4305: 'argument' : truncation from 'double' to 'irr::f32'
1>e:\sussex\dissertation\irrlicht\irrlicht-1.4.1\examples\anim16\main.cpp(122) : warning C4305: '=' : truncation from 'double' to 'irr::f32'
1>e:\sussex\dissertation\irrlicht\irrlicht-1.4.1\examples\anim16\main.cpp(137) : warning C4244: '=' : conversion from 'double' to 'irr::f32', possible loss of data
1>e:\sussex\dissertation\irrlicht\irrlicht-1.4.1\examples\anim16\main.cpp(138) : warning C4244: '=' : conversion from 'double' to 'irr::f32', possible loss of data
1>e:\sussex\dissertation\irrlicht\irrlicht-1.4.1\examples\anim16\main.cpp(139) : warning C4244: '=' : conversion from 'double' to 'irr::f32', possible loss of data
1>e:\sussex\dissertation\irrlicht\irrlicht-1.4.1\examples\anim16\main.cpp(142) : warning C4244: 'argument' : conversion from 'irr::s32' to 'irr::f32', possible loss of data
1>e:\sussex\dissertation\irrlicht\irrlicht-1.4.1\examples\anim16\main.cpp(111) : warning C4700: uninitialized local variable 'fpsTemp' used
1>Linking...
1>main.obj : error LNK2019: unresolved external symbol "public: void __thiscall cSkeleton::setAnimType(enum CSK_ANIM)" (?setAnimType@cSkeleton@@QAEXW4CSK_ANIM@@@Z) referenced in function "public: void __thiscall cInput::handleInput(class cEventReceiver *,class cSkeleton *)" (?handleInput@cInput@@QAEXPAVcEventReceiver@@PAVcSkeleton@@@Z)
1>main.obj : error LNK2019: unresolved external symbol "public: __thiscall cSkeleton::~cSkeleton(void)" (??1cSkeleton@@QAE@XZ) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "public: unsigned int __thiscall cSkeleton::getMotionVariable(void)" (?getMotionVariable@cSkeleton@@QAEIXZ) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "public: enum CSK_ANIM __thiscall cSkeleton::getAnimType(void)const " (?getAnimType@cSkeleton@@QBE?AW4CSK_ANIM@@XZ) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "public: void __thiscall cSkeleton::animSkeleton(void)" (?animSkeleton@cSkeleton@@QAEXXZ) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "public: class irr::scene::IAnimatedMeshSceneNode * __thiscall cSkeleton::getSkeletonSceneNode(void)" (?getSkeletonSceneNode@cSkeleton@@QAEPAVIAnimatedMeshSceneNode@scene@irr@@XZ) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "public: void __thiscall cSkeleton::Initialize(class irr::scene::IAnimatedMeshSceneNode *,unsigned int)" (?Initialize@cSkeleton@@QAEXPAVIAnimatedMeshSceneNode@scene@irr@@I@Z) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "public: __thiscall cSkeleton::cSkeleton(void)" (??0cSkeleton@@QAE@XZ) referenced in function _main
1>E:\Sussex\Dissertation\IRRLicht\irrlicht-1.4.1\examples\anim16\Debug\anim16.exe : fatal error LNK1120: 8 unresolved externals
1>Build log was saved at "file://e:\Sussex\Dissertation\IRRLicht\irrlicht-1.4.1\examples\anim16\Debug\BuildLog.htm"
1>anim16 - 9 error(s), 12 warning(s)
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========
what cold be the reason for the same!!
I am using Visual C++ 2008 Express edition.I created an empty project and added your code and related files in the corresponding directories.
kulanuja
Posts: 20
Joined: Sat Jun 14, 2008 11:10 am

Post by kulanuja »

no psts frm anybody :cry:

is there a .vcproj file of this application which I can use??
shadowslair
Posts: 758
Joined: Mon Mar 31, 2008 3:32 pm
Location: Bulgaria

Post by shadowslair »

Make sure you`re using the last Irrlicht.dll version. Make sure you have fixed the zero-index-member bug (see the posts here). Check the project paths and settings too...

I had some issues too, but somehow I managed to fix them. I would send you my project, but I made lots of modifications on the class and woth the function to feed my needs. Not to mention that the code is such a mess, `cause currently I`m testing something... :?
"Although we walk on the ground and step in the mud... our dreams and endeavors reach the immense skies..."
kulanuja
Posts: 20
Joined: Sat Jun 14, 2008 11:10 am

Post by kulanuja »

Thanks a lot !!
Although I still have the warnings..atleast the code is compiling and running properly!! :o
kulanuja
Posts: 20
Joined: Sat Jun 14, 2008 11:10 am

Post by kulanuja »

The animation runs very slow if I use OpenGL . Is it a hardware issue?

Instead of passing EDT_OPENGL if I pass EDT_SOFTWARE to createDevice the graphics obviously not rendered as they are meant to be and all the cycles (i.e walk,run) are rendered very fast !!
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Maybe you're also struck by the 1.4.1 OpenGL bug with ATI cards under OpenGL2.0?
kulanuja
Posts: 20
Joined: Sat Jun 14, 2008 11:10 am

Post by kulanuja »

Indeed I am using an ATI Radeon card.But what is this bug?Can you please elaborate?Any solution for that?
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Yes, it's in the bug forum. You simply have to replace one test in COpenGLExtensionHandler.cpp in order to avoid usage of NPOT textures internally.
kulanuja
Posts: 20
Joined: Sat Jun 14, 2008 11:10 am

Post by kulanuja »

Thanks hybrid!!
That indeed helped.On the contratry the animation is now running too fast even at minimum speed at around 300 FPS!! :P
kulanuja
Posts: 20
Joined: Sat Jun 14, 2008 11:10 am

Post by kulanuja »

I understood the signifiance of bonesOsci..but what is the significance of bonesOsciPos ? :?:

Also all the other animaions seem to be carried out by bonesOsci,but how is the "jumping" animation performed!!can somebody plz explain :shock:
shadowslair
Posts: 758
Joined: Mon Mar 31, 2008 3:32 pm
Location: Bulgaria

Post by shadowslair »

Also all the other animaions seem to be carried out by bonesOsci,but how is the "jumping" animation performed!!can somebody plz explain Shocked
I cannot understand what do you mean. The code is:

Code: Select all

// animation for jumping --------------------------------------------------
	case CSK_ANIM_JUMP:

		if (UstartMode[CSK_ANIM_JUMP]) {
			
			if (a==180 || a==0) {
				UstartMode[CSK_ANIM_JUMP] = false;
				UpperAnimType=CSK_ANIM_STAND;
				Ui=Ui-Uspeed-Uspeed;
			}

		} else {
			(a<=180) ? (Ui=180) : (Ui=360);
			UstartMode[CSK_ANIM_JUMP] = true;
		}
It checks if the character is ready for the animation, if not it prepares him, and after this it starts the jump animation. Check the code. If I remember correctly there were some statement checks, which make it be different than the walk and run animations. Have to confess that there are lots of things that are still unclear to me, which will change ater my exam session is over...
I understood the signifiance of bonesOsci..but what is the significance of bonesOsciPos ? Question
You right- it seems like the bonesOsciPos is not used- marking this line as a comment does not affect in any way

Code: Select all

bones[n]->setPosition(bonesPos[n]+ bonesOsciPos[n]);
It has its use for sure though, but I stll spent only a few hours working on it, that`s why I still cannot figure it out, which will change soon... :D


PS:
Although I still have the warnings..atleast the code is compiling and running properly!! Surprised
And that`s ok. Those are just some variable type issues, which can be fixed easily. I left only two or three of them, being far too lazy to make them as they should be :wink:
"Although we walk on the ground and step in the mud... our dreams and endeavors reach the immense skies..."
kulanuja
Posts: 20
Joined: Sat Jun 14, 2008 11:10 am

Post by kulanuja »

Also all the other animaions seem to be carried out by bonesOsci,but how is the "jumping" animation performed!!can somebody plz explain
By this I meant the actual statements which carry out the animation or the oscillation of bones are something like

Code: Select all

// LEGS
		bonesOsci[SKT_BONE_LEG_R] = core::vector3df( -dryAbrasion * 46.f * sinAlpha , -dryAbrasion*7.f*sinAlpha ,0);
		bonesOsci[SKT_BONE_LEG_L] = core::vector3df( -dryAbrasion * 46.f * sinBeta , -dryAbrasion*7.f*sinAlpha ,0);
Such code can be seen in other animations..But not in "jumping"!!Then which are the statements which perform the actual animation!! :?:

What I understood from the code for jumping is that it checks if the player is ready for jumping,if not it prepares it and then sets some boolean variables and changes the speed.Plz correct me if I have misunderstood any part.

Can you plz elaborate what you mean by
and after this it starts the jump animation. Check the code. If I remember correctly there were some statement checks
How does it start jumping?which statement checks are you talking about?? :shock:
joshua1091
Posts: 23
Joined: Thu Aug 09, 2007 5:16 pm

multi animations

Post by joshua1091 »

with your kind of code,is it possible to articulate different joints based on different key strokes at same time...for eg.,
i will be pressing up arrow key and moving my mouse up at same time,
my up arrow key is used to move the character(at this time i have to rotate the legs so as to manipulate walking)
my mouse movement is used for aiming(at this time i have to rotate the hand with the weapon)
so when i press up for walking and simultaneously aiming with my mouse,is it possible with your code...
i know it needs extensions,could your code be used as model/sample for the forementioned feature
xray
Posts: 231
Joined: Fri Feb 02, 2007 1:06 pm
Location: Germany, Munich
Contact:

Post by xray »

is it possible with your code...
Sure, it is!
wuallen
Posts: 67
Joined: Thu Jan 25, 2007 3:07 am
Location: Shanghai

Post by wuallen »

awsome code. I like it, I think it may be the infancy of another euphoria.

look this, we should discuss dynamic motion, it is absolutely an awsome subject.

http://www.naturalmotion.com/euphoria.htm
Post Reply