Files |  Tutorials |  Articles |  Links |  Home |  Team |  Forum |  Wiki |  Impressum

Aktuelle Zeit: Fr Jul 11, 2025 02:21

Foren-Übersicht » Programmierung » Allgemein
Unbeantwortete Themen | Aktive Themen



Ein neues Thema erstellen Auf das Thema antworten  [ 4 Beiträge ] 
Autor Nachricht
 Betreff des Beitrags: bvh -> msa (degrees to euler)
BeitragVerfasst: Do Okt 09, 2003 18:24 
Offline
DGL Member
Benutzeravatar

Registriert: Di Jul 01, 2003 18:59
Beiträge: 887
Wohnort: (The Netherlands)
Programmiersprache: fpc/delphi/java/c#
i am trying to write an loader for bvh files. The problem is that bvh stores the rotation values in degrees. So far so good. I included the result here in mocap.zip. It seems to work.

But now i want to merge it with the msa loader i added to the 3ds loader. Now i have to convert the angles in degrees to euler data. Is there a nice simple way to do it or only the long hard way.


Du hast keine ausreichende Berechtigung, um die Dateianhänge dieses Beitrags anzusehen.

_________________
http://3das.noeska.com - create adventure games without programming


Nach oben
 Profil  
Mit Zitat antworten  
 Betreff des Beitrags:
BeitragVerfasst: Do Okt 09, 2003 19:17 
Offline
DGL Member
Benutzeravatar

Registriert: Fr Dez 13, 2002 12:18
Beiträge: 1063
i'm not quite sure what you mean: euler angles are (by my knowledge) the angles you have to rotate an object around the coordinate axii - looking at your tanimframe class it seems to be that what you have already.
the problem with euler angles is, that they are not invariant to the order they are called (xyz results in another orientation as yxz).
maybe you could define your problem more exactly - in my own code I use only rotations matrices and, if needed, quaternions to interpolate angles, since euler angles can be quite a hassle, even if they seem to be the easiest way to rotate at the beginning.

so my advice is not to use the rotation information in the same way as you find it in 3d-files but to convert it either to rotation matrices (which are quite useful, because you can read the coordinate system axises any time out of them) or to quaternions (which are more compact, but not really less expensive to use as matrix multiplications) - the choice is yours.

_________________
Viel Spaß beim Programmieren,
Mars
http://www.basegraph.com/


Nach oben
 Profil  
Mit Zitat antworten  
 Betreff des Beitrags:
BeitragVerfasst: Sa Okt 11, 2003 10:08 
Offline
DGL Member
Benutzeravatar

Registriert: Di Jul 01, 2003 18:59
Beiträge: 887
Wohnort: (The Netherlands)
Programmiersprache: fpc/delphi/java/c#
my problem may be more in not knowing the milksape ascii format good enough. I post a bvh file and the msa format i created using it. There are some similarities. The translate values are unchanged. But the rotation values are not. At first i thougt they had to be converted from degrees to radians. It worked for the x and z coordinates, but not for the y coordinates. Maybe i should render it using the sample above and then read out the matrix for every bonepoint?


Du hast keine ausreichende Berechtigung, um die Dateianhänge dieses Beitrags anzusehen.

_________________
http://3das.noeska.com - create adventure games without programming


Nach oben
 Profil  
Mit Zitat antworten  
 Betreff des Beitrags:
BeitragVerfasst: Sa Okt 11, 2003 11:43 
Offline
DGL Member
Benutzeravatar

Registriert: Fr Dez 13, 2002 12:18
Beiträge: 1063
if the values in the bvh file are angles (i don't know the bvh format, but i think the "channels" consisting of the rotation values have to be filled somehow) they are probably given in degrees, since there are values up to 60, which would mean 10 full rotations, if they were radian.

if one or two rotations seem to be correct, but the third is not, you are probably facing the problem that the order of your rotations is not correct.
are you sure that you follow the channel order in the bvh file ?
Rotation of object A around X,Y,Z renders another result as rotation of A around Y,X,Z
If you rotate with euler angles around X and Z, the X and Z axii of the resulting object will still be orthogonal, however, if you rotate around XYZ, XZ and YZ rotation axii of the resulting object (when rendered with glRotate(y, 0,1,0) and glRotate(y, 0,0,1) are not necessarily orthogonal anymore - they can even be the same (called the gimble lock problem).

_________________
Viel Spaß beim Programmieren,
Mars
http://www.basegraph.com/


Nach oben
 Profil  
Mit Zitat antworten  
Beiträge der letzten Zeit anzeigen:  Sortiere nach  
Ein neues Thema erstellen Auf das Thema antworten  [ 4 Beiträge ] 
Foren-Übersicht » Programmierung » Allgemein


Wer ist online?

Mitglieder in diesem Forum: 0 Mitglieder und 4 Gäste


Du darfst keine neuen Themen in diesem Forum erstellen.
Du darfst keine Antworten zu Themen in diesem Forum erstellen.
Du darfst deine Beiträge in diesem Forum nicht ändern.
Du darfst deine Beiträge in diesem Forum nicht löschen.
Du darfst keine Dateianhänge in diesem Forum erstellen.

Suche nach:
Gehe zu:  
  Powered by phpBB® Forum Software © phpBB Group
Deutsche Übersetzung durch phpBB.de
[ Time : 0.007s | 14 Queries | GZIP : On ]