Inverse kinematik

Inverse kinematik

Discuss game development here, from a distinct game project to an accessible third-party mutator, down to the interaction and design of individual units if you like.

Moderator: Moderators

Post Reply
User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10454
Joined: 24 Jan 2006, 21:12

Inverse kinematik

Post by PicassoCT »

Hi everyone,

as already stated im porting some inverse kinematik to spring.

https://github.com/PicassoCT/spring

Here is the engine Version forked from development. Its not refined and polished yet.
And i need some help.
Basically the Transformation the bone is going through, is stored in a for me rather new format, a AngleAxis.
Its basically 3 Rotations and a axis Vector.
If this where some affirmative matrix i would have had extracted the rotationmatrices and be done with it.
But its not.
Following the approach of the example -
Vector3f = AxisAngle T * Point3f(0,0, magnitudeOfBone);
leads to a axis vector (0,0,1)
Latest Version of Function:
https://github.com/PicassoCT/spring/blo ... t.cpp#L218

So how can i extract the rotations from this construct? I dont want a piece of code, just a hint at the solution.
Also regarding Eigen, yes its a template Library, but its actually very sleak:
http://eigen.tuxfamily.org/index.php?title=Benchmark
These guys profile there stuff and several of the projects using it, are performance intensive operations (CERN), so its more by accident then by comparisson, actually a good choice.

Thanks for any hint or help. Regards Pica.

made the topic more meainingful -- abma


what if the topic is minimalistic existencialistic? -- jk

do you really want to discuss meta-post-philosophy in a mad guys thread? -- abma

nobody else around to watch it, so go for it, morel enslaved bitches-- Nietzsche
Last edited by PicassoCT on 15 Sep 2016, 16:35, edited 1 time in total.
User avatar
azaremoth
Cursed Developer
Posts: 549
Joined: 17 Feb 2005, 22:05

Re: Inverse kinematik

Post by azaremoth »

So, ideas? I fear, I can not help here, as I do not understand half of your post. :wink:
User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10454
Joined: 24 Jan 2006, 21:12

Re: Inverse kinematik

Post by PicassoCT »

Spend another week of holiday or overtime on it?

Think i have a way of approaching it now
User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10454
Joined: 24 Jan 2006, 21:12

Re: Inverse kinematik

Post by PicassoCT »

Okay, the good news is, its resolving, the bad news is, its resolving bullshit. The rotation extracted from the resolved ik-chain are not usefull.

Image

I do:
Count up and conter all rotations on previous pieces , so that inverse kinematiks are always resolved from a zeroed base piece

The troubles seem to be related too the Conversion back from Angle-Axis to Euler Angles..

https://github.com/PicassoCT/spring/blo ... t.cpp#L236

As Always any help would be welcome, also should there be a speed for every piece solution, or a time-wise solution aka - every turning piece has 3000 ms to get to where its wanted?

PS: My Origin is depending on the pieces, the original angle is always 0° at (0,0,1). Possible that i forgot to take this starting offset into account.

Im following this approach.
http://www.euclideanspace.com/maths/standards/index.htm
http://www.euclideanspace.com/maths/geo ... /index.htm
Attachments
wrong resolved.jpg
(1.06 MiB) Not downloaded yet
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Inverse kinematik

Post by smoth »

cool, good to see someone trying to do something with this.
User avatar
azaremoth
Cursed Developer
Posts: 549
Joined: 17 Feb 2005, 22:05

Re: Inverse kinematik

Post by azaremoth »

So, any news here?
User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10454
Joined: 24 Jan 2006, 21:12

Re: Inverse kinematik

Post by PicassoCT »

It still a bugfest.

If you want to check it out:
https://github.com/PicassoCT/spring

After make install - open a jw game and:
/cheat
/give iktest

alter the points it shall drive too to your hearts content
???
It does strange things..
abma
Spring Developer
Posts: 3798
Joined: 01 Jun 2009, 00:08

Re: Inverse kinematik

Post by abma »

the file install_manifest.txt looks like beeing added by accident?! it needs to be added to .gitignore i guess?!
User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10454
Joined: 24 Jan 2006, 21:12

Re: Inverse kinematik

Post by PicassoCT »

Removed install_manifest.txt

PS: Abma, i dont get the object orientated structure of spring-lobby. Which object holds the results of the search in PrDownloader, and where is the expected format specified in which i need to convert them to display them along the springfile searchresults in the wx-widget?
9heart
Posts: 55
Joined: 16 Sep 2010, 16:14

Re: Inverse kinematik

Post by 9heart »

you might want to look at avoiding this euler angle problem by changing how rotations are handled in 3DModel.h

Code: Select all

void ComposeTransform(CMatrix44f& m, const float3& t, const float3& r, const float3& s) const {

		// note: translating + rotating is faster than
		// matrix-multiplying (but the branching hurts)
		//
		
		
		...
		
		}
		
		
its 2016, everyone has fast PC, surely we can add matrix-multiplied rotations? it'll avoid this euler nonsense and make IK much simpler... unless matrix-multiplication leads to rounding errors (desync?) If thats the case, i advise you to switch to simpler game design with non-sync engine (unity)
User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10454
Joined: 24 Jan 2006, 21:12

Re: Inverse kinematik

Post by PicassoCT »

Sorry i generally ignore any comment that has the current year in it- knowledge is like good vine, it has to ripe at least one year to be diggestable.
Post Reply

Return to “Game Development”