Page 1 of 1

Inverse kinematik

Posted: 11 Sep 2016, 02:36
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

Re: Inverse kinematik

Posted: 13 Sep 2016, 12:13
by azaremoth
So, ideas? I fear, I can not help here, as I do not understand half of your post. :wink:

Re: Inverse kinematik

Posted: 13 Sep 2016, 18:47
by PicassoCT
Spend another week of holiday or overtime on it?

Think i have a way of approaching it now

Re: Inverse kinematik

Posted: 20 Sep 2016, 15:40
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

Re: Inverse kinematik

Posted: 21 Sep 2016, 07:16
by smoth
cool, good to see someone trying to do something with this.

Re: Inverse kinematik

Posted: 09 Oct 2016, 01:28
by azaremoth
So, any news here?

Re: Inverse kinematik

Posted: 09 Oct 2016, 11:24
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..

Re: Inverse kinematik

Posted: 15 Oct 2016, 02:43
by abma
the file install_manifest.txt looks like beeing added by accident?! it needs to be added to .gitignore i guess?!

Re: Inverse kinematik

Posted: 15 Oct 2016, 20:05
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?

Re: Inverse kinematik

Posted: 16 Oct 2016, 16:35
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)

Re: Inverse kinematik

Posted: 16 Oct 2016, 17:16
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.