## Re: [Algorithms] Animation mirroring

 Re: [Algorithms] Animation mirroring From: Jonathan Blow - 2004-11-09 02:00:07 ```Mike Krazanowski wrote: >Performing the reflection at the root node does mirror the whole >hierarchy if I remember correctly. =20 > Right, but you don't *actually* want to do that. There are two=20 different ways to "mirror" an animated mesh: 1) Perform the original animation on it then mirror the vertices. 2) Change all the bone rotations so that a movement on the right becomes=20 a movement on the left, etc, then leave the vertices alone. There are a lot of implementation details that can be different from the=20 basic statements above, but those are the options. (1) is what you're=20 talking about but it is not a very good idea (for all the reasons you=20 state). Putting a reflection in the root node is mathematically=20 equivalent to doing the skinning normally and then mirroring the=20 vertices, they are all category (1). What you want is category (2), in which you change the rotations without=20 reflecting the space. I recommend thinking about how to reflect each=20 bone in object space, since that's the easist way to visualize it. Then=20 if you want to do that in bone space instead, you just transform the=20 plane of reflection from object to bone space. To reflect a single bone, I recommend thinking about the rotation in the=20 "reach/twist" form, which makes it easier to visualize as well. I have=20 an article that talks about reach/twist: http://number-none.com/product/IK%20with%20Quaternion%20Joint%20Limits/in= dex.html >Unfortunately, the mirror operation >converts a right-handed matrix to a left-handed matrix and vice versa. >Although, you will get an object that resembles your original object >mirrored, the back face culling logic becomes inverted (and needs to be >checked for and corrected in our engine) and the UV coordinates are also >mirrored about that plane (a big problem for objects with un-mirror-able >textures applied like text). =20 > >// Mike=20 > > >-----Original Message----- >From: Tyson Jensen [mailto:twjensen@...]=20 >Sent: Monday, November 08, 2004 2:02 PM >To: gdalgorithms-list@... >Subject: RE: [Algorithms] Animation mirroring > >You need to transform all your bones to world space anyway in order to >render the associated skin. Adding the transform to the very end seems >a little unnatural to me, however. I would apply the mirror transform >to the actor's local to world matrix (basically the root bone matrix), >which then is multiplied through the joint chain for rendering. Of >course, I'm assuming that you want to render this thing. > >If you need this for other reasons, just borrow the code from your >rendering engine assuming that's already working. Our engine provides >an API to get the "as rendered" transforms so that other subsystems can >look at the bone locations and orientations in world coordinates. >That's proved very convenient for those who don't really care about >joint-chains and animation code but need to know something like "where's >this guy's forearm bone right now?" > >-----Original Message----- >From: gdalgorithms-list-admin@... >[mailto:gdalgorithms-list-admin@...] On Behalf Of Mike >Krazanowski >Sent: Monday, November 08, 2004 11:28 AM >To: gdalgorithms-list@... >Subject: [Algorithms] Animation mirroring > >Hey,=20 > >I am new to this topic so please bear with me. > >=20 > >We need to mirror our animations by a world-space plane. Our animation >system stores key-frames with absolute time values and relative rotation >and translation components (relative to the bone's or hierarchy's parent >node). We have implemented a mirroring system that essentially >transforms each animated bone to world space and then performs the >mirror operation as a post process. Unfortunately, we also have an >animation blending system that can operate entirely in bone space and >therefore our animation system performs the blend op before the mirror >op. This poses a problem when we need to blend an un-mirrored animation >with a mirrored one. > >=20 > >I have maintained that, because the mirror op is a world-space >operation, the application of the mirroring on each bone must either be >done in world-space or the op must be transformed to bone-space and then >applied. In either case the whole skeleton/hierarchy must be >transformed to world-space at some point, or the mirror op needs to be >transformed to bone space and propagated through the hierarchy to >perform the mirror operation. > >=20 > >Does anybody have any resources or better explanation of this problem?? > >=20 > >=20 > > > >------------------------------------------------------- >This SF.Net email is sponsored by: >Sybase ASE Linux Express Edition - download now for FREE >LinuxWorld Reader's Choice Award Winner for best database on Linux. >http://ads.osdn.com/?ad_idU88&alloc_id=12065&op=3Dick >_______________________________________________ >GDAlgorithms-list mailing list >GDAlgorithms-list@... >https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list >Archives: >http://sourceforge.net/mailarchive/forum.php?forum_ida88 > > >------------------------------------------------------- >This SF.Net email is sponsored by: >Sybase ASE Linux Express Edition - download now for FREE >LinuxWorld Reader's Choice Award Winner for best database on Linux. >http://ads.osdn.com/?ad_idU88&alloc_id=12065&op=3Dick >_______________________________________________ >GDAlgorithms-list mailing list >GDAlgorithms-list@... >https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list >Archives: >http://sourceforge.net/mailarchive/forum.php?forum_ida88 > > > > > >------------------------------------------------------- >This SF.Net email is sponsored by: >Sybase ASE Linux Express Edition - download now for FREE >LinuxWorld Reader's Choice Award Winner for best database on Linux. >http://ads.osdn.com/?ad_idU88&alloc_id=12065&op=CCk >_______________________________________________ >GDAlgorithms-list mailing list >GDAlgorithms-list@... >https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list >Archives: >http://sourceforge.net/mailarchive/forum.php?forum_ida88 > > =20 > ```

 RE: [Algorithms] Animation mirroring From: Tyson Jensen - 2004-11-08 22:01:59 ```You need to transform all your bones to world space anyway in order to render the associated skin. Adding the transform to the very end seems a little unnatural to me, however. I would apply the mirror transform to the actor's local to world matrix (basically the root bone matrix), which then is multiplied through the joint chain for rendering. Of course, I'm assuming that you want to render this thing. If you need this for other reasons, just borrow the code from your rendering engine assuming that's already working. Our engine provides an API to get the "as rendered" transforms so that other subsystems can look at the bone locations and orientations in world coordinates. That's proved very convenient for those who don't really care about joint-chains and animation code but need to know something like "where's this guy's forearm bone right now?" -----Original Message----- From: gdalgorithms-list-admin@... [mailto:gdalgorithms-list-admin@...] On Behalf Of Mike Krazanowski Sent: Monday, November 08, 2004 11:28 AM To: gdalgorithms-list@... Subject: [Algorithms] Animation mirroring Hey,=20 I am new to this topic so please bear with me. =20 We need to mirror our animations by a world-space plane. Our animation system stores key-frames with absolute time values and relative rotation and translation components (relative to the bone's or hierarchy's parent node). We have implemented a mirroring system that essentially transforms each animated bone to world space and then performs the mirror operation as a post process. Unfortunately, we also have an animation blending system that can operate entirely in bone space and therefore our animation system performs the blend op before the mirror op. This poses a problem when we need to blend an un-mirrored animation with a mirrored one. =20 I have maintained that, because the mirror op is a world-space operation, the application of the mirroring on each bone must either be done in world-space or the op must be transformed to bone-space and then applied. In either case the whole skeleton/hierarchy must be transformed to world-space at some point, or the mirror op needs to be transformed to bone space and propagated through the hierarchy to perform the mirror operation. =20 Does anybody have any resources or better explanation of this problem?? =20 =20 ------------------------------------------------------- This SF.Net email is sponsored by: Sybase ASE Linux Express Edition - download now for FREE LinuxWorld Reader's Choice Award Winner for best database on Linux. http://ads.osdn.com/?ad_idU88&alloc_id=12065&op=3Dick _______________________________________________ GDAlgorithms-list mailing list GDAlgorithms-list@... https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list Archives: http://sourceforge.net/mailarchive/forum.php?forum_ida88 ```
 RE: [Algorithms] Animation mirroring From: Mike Krazanowski - 2004-11-08 23:41:45 ```Performing the reflection at the root node does mirror the whole hierarchy if I remember correctly. Unfortunately, the mirror operation converts a right-handed matrix to a left-handed matrix and vice versa. Although, you will get an object that resembles your original object mirrored, the back face culling logic becomes inverted (and needs to be checked for and corrected in our engine) and the UV coordinates are also mirrored about that plane (a big problem for objects with un-mirror-able textures applied like text). =20 // Mike=20 -----Original Message----- From: Tyson Jensen [mailto:twjensen@...]=20 Sent: Monday, November 08, 2004 2:02 PM To: gdalgorithms-list@... Subject: RE: [Algorithms] Animation mirroring You need to transform all your bones to world space anyway in order to render the associated skin. Adding the transform to the very end seems a little unnatural to me, however. I would apply the mirror transform to the actor's local to world matrix (basically the root bone matrix), which then is multiplied through the joint chain for rendering. Of course, I'm assuming that you want to render this thing. If you need this for other reasons, just borrow the code from your rendering engine assuming that's already working. Our engine provides an API to get the "as rendered" transforms so that other subsystems can look at the bone locations and orientations in world coordinates. That's proved very convenient for those who don't really care about joint-chains and animation code but need to know something like "where's this guy's forearm bone right now?" -----Original Message----- From: gdalgorithms-list-admin@... [mailto:gdalgorithms-list-admin@...] On Behalf Of Mike Krazanowski Sent: Monday, November 08, 2004 11:28 AM To: gdalgorithms-list@... Subject: [Algorithms] Animation mirroring Hey,=20 I am new to this topic so please bear with me. =20 We need to mirror our animations by a world-space plane. Our animation system stores key-frames with absolute time values and relative rotation and translation components (relative to the bone's or hierarchy's parent node). We have implemented a mirroring system that essentially transforms each animated bone to world space and then performs the mirror operation as a post process. Unfortunately, we also have an animation blending system that can operate entirely in bone space and therefore our animation system performs the blend op before the mirror op. This poses a problem when we need to blend an un-mirrored animation with a mirrored one. =20 I have maintained that, because the mirror op is a world-space operation, the application of the mirroring on each bone must either be done in world-space or the op must be transformed to bone-space and then applied. In either case the whole skeleton/hierarchy must be transformed to world-space at some point, or the mirror op needs to be transformed to bone space and propagated through the hierarchy to perform the mirror operation. =20 Does anybody have any resources or better explanation of this problem?? =20 =20 ------------------------------------------------------- This SF.Net email is sponsored by: Sybase ASE Linux Express Edition - download now for FREE LinuxWorld Reader's Choice Award Winner for best database on Linux. http://ads.osdn.com/?ad_idU88&alloc_id=12065&op=3Dick _______________________________________________ GDAlgorithms-list mailing list GDAlgorithms-list@... https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list Archives: http://sourceforge.net/mailarchive/forum.php?forum_ida88 ------------------------------------------------------- This SF.Net email is sponsored by: Sybase ASE Linux Express Edition - download now for FREE LinuxWorld Reader's Choice Award Winner for best database on Linux. http://ads.osdn.com/?ad_idU88&alloc_id=12065&op=3Dick _______________________________________________ GDAlgorithms-list mailing list GDAlgorithms-list@... https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list Archives: http://sourceforge.net/mailarchive/forum.php?forum_ida88 ```
 Re: [Algorithms] Animation mirroring From: Jonathan Blow - 2004-11-09 02:00:07 ```Mike Krazanowski wrote: >Performing the reflection at the root node does mirror the whole >hierarchy if I remember correctly. =20 > Right, but you don't *actually* want to do that. There are two=20 different ways to "mirror" an animated mesh: 1) Perform the original animation on it then mirror the vertices. 2) Change all the bone rotations so that a movement on the right becomes=20 a movement on the left, etc, then leave the vertices alone. There are a lot of implementation details that can be different from the=20 basic statements above, but those are the options. (1) is what you're=20 talking about but it is not a very good idea (for all the reasons you=20 state). Putting a reflection in the root node is mathematically=20 equivalent to doing the skinning normally and then mirroring the=20 vertices, they are all category (1). What you want is category (2), in which you change the rotations without=20 reflecting the space. I recommend thinking about how to reflect each=20 bone in object space, since that's the easist way to visualize it. Then=20 if you want to do that in bone space instead, you just transform the=20 plane of reflection from object to bone space. To reflect a single bone, I recommend thinking about the rotation in the=20 "reach/twist" form, which makes it easier to visualize as well. I have=20 an article that talks about reach/twist: http://number-none.com/product/IK%20with%20Quaternion%20Joint%20Limits/in= dex.html >Unfortunately, the mirror operation >converts a right-handed matrix to a left-handed matrix and vice versa. >Although, you will get an object that resembles your original object >mirrored, the back face culling logic becomes inverted (and needs to be >checked for and corrected in our engine) and the UV coordinates are also >mirrored about that plane (a big problem for objects with un-mirror-able >textures applied like text). =20 > >// Mike=20 > > >-----Original Message----- >From: Tyson Jensen [mailto:twjensen@...]=20 >Sent: Monday, November 08, 2004 2:02 PM >To: gdalgorithms-list@... >Subject: RE: [Algorithms] Animation mirroring > >You need to transform all your bones to world space anyway in order to >render the associated skin. Adding the transform to the very end seems >a little unnatural to me, however. I would apply the mirror transform >to the actor's local to world matrix (basically the root bone matrix), >which then is multiplied through the joint chain for rendering. Of >course, I'm assuming that you want to render this thing. > >If you need this for other reasons, just borrow the code from your >rendering engine assuming that's already working. Our engine provides >an API to get the "as rendered" transforms so that other subsystems can >look at the bone locations and orientations in world coordinates. >That's proved very convenient for those who don't really care about >joint-chains and animation code but need to know something like "where's >this guy's forearm bone right now?" > >-----Original Message----- >From: gdalgorithms-list-admin@... >[mailto:gdalgorithms-list-admin@...] On Behalf Of Mike >Krazanowski >Sent: Monday, November 08, 2004 11:28 AM >To: gdalgorithms-list@... >Subject: [Algorithms] Animation mirroring > >Hey,=20 > >I am new to this topic so please bear with me. > >=20 > >We need to mirror our animations by a world-space plane. Our animation >system stores key-frames with absolute time values and relative rotation >and translation components (relative to the bone's or hierarchy's parent >node). We have implemented a mirroring system that essentially >transforms each animated bone to world space and then performs the >mirror operation as a post process. Unfortunately, we also have an >animation blending system that can operate entirely in bone space and >therefore our animation system performs the blend op before the mirror >op. This poses a problem when we need to blend an un-mirrored animation >with a mirrored one. > >=20 > >I have maintained that, because the mirror op is a world-space >operation, the application of the mirroring on each bone must either be >done in world-space or the op must be transformed to bone-space and then >applied. In either case the whole skeleton/hierarchy must be >transformed to world-space at some point, or the mirror op needs to be >transformed to bone space and propagated through the hierarchy to >perform the mirror operation. > >=20 > >Does anybody have any resources or better explanation of this problem?? > >=20 > >=20 > > > >------------------------------------------------------- >This SF.Net email is sponsored by: >Sybase ASE Linux Express Edition - download now for FREE >LinuxWorld Reader's Choice Award Winner for best database on Linux. >http://ads.osdn.com/?ad_idU88&alloc_id=12065&op=3Dick >_______________________________________________ >GDAlgorithms-list mailing list >GDAlgorithms-list@... >https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list >Archives: >http://sourceforge.net/mailarchive/forum.php?forum_ida88 > > >------------------------------------------------------- >This SF.Net email is sponsored by: >Sybase ASE Linux Express Edition - download now for FREE >LinuxWorld Reader's Choice Award Winner for best database on Linux. >http://ads.osdn.com/?ad_idU88&alloc_id=12065&op=3Dick >_______________________________________________ >GDAlgorithms-list mailing list >GDAlgorithms-list@... >https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list >Archives: >http://sourceforge.net/mailarchive/forum.php?forum_ida88 > > > > > >------------------------------------------------------- >This SF.Net email is sponsored by: >Sybase ASE Linux Express Edition - download now for FREE >LinuxWorld Reader's Choice Award Winner for best database on Linux. >http://ads.osdn.com/?ad_idU88&alloc_id=12065&op=CCk >_______________________________________________ >GDAlgorithms-list mailing list >GDAlgorithms-list@... >https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list >Archives: >http://sourceforge.net/mailarchive/forum.php?forum_ida88 > > =20 > ```
 RE: [Algorithms] Animation mirroring From: Mike Krazanowski - 2004-11-08 23:47:43 ```Isn't this the result of the gimbal-lock problem? Or have I missed something? I believe that we are blending between the animations by slerping between each bone's quaternions at this point. It seems to work for the most part with hundreds of animations in use. // Mike -----Original Message----- From: Jonathan Blow [mailto:jon@...]=20 Sent: Monday, November 08, 2004 1:55 PM To: gdalgorithms-list@... Subject: Re: [Algorithms] Animation mirroring I want to interject with the comment that blending in bone space is not=20 a good idea. You probably want to blend in object space. The reason is, because of rotations not commuting and all that,=20 blending/interpolating between bone space rotations will often give you=20 a final pose that is nowhere near either of the blend inputs. I suspect that you haven't seen this because you just haven't thrown a=20 lot of data at your blend system yet (it's new?) Mike Krazanowski wrote: >Hey,=20 > >I am new to this topic so please bear with me. > >=20 > >We need to mirror our animations by a world-space plane. Our animation >system stores key-frames with absolute time values and relative rotation >and translation components (relative to the bone's or hierarchy's parent >node). We have implemented a mirroring system that essentially >transforms each animated bone to world space and then performs the >mirror operation as a post process. Unfortunately, we also have an >animation blending system that can operate entirely in bone space and >therefore our animation system performs the blend op before the mirror >op. This poses a problem when we need to blend an un-mirrored animation >with a mirrored one. > >=20 > >I have maintained that, because the mirror op is a world-space >operation, the application of the mirroring on each bone must either be >done in world-space or the op must be transformed to bone-space and then >applied. In either case the whole skeleton/hierarchy must be >transformed to world-space at some point, or the mirror op needs to be >transformed to bone space and propagated through the hierarchy to >perform the mirror operation. > >=20 > >Does anybody have any resources or better explanation of this problem?? > >=20 > >=20 > > > >------------------------------------------------------- >This SF.Net email is sponsored by: >Sybase ASE Linux Express Edition - download now for FREE >LinuxWorld Reader's Choice Award Winner for best database on Linux. >http://ads.osdn.com/?ad_idU88&alloc_id=12065&op=CCk >_______________________________________________ >GDAlgorithms-list mailing list >GDAlgorithms-list@... >https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list >Archives: >http://sourceforge.net/mailarchive/forum.php?forum_ida88 > > =20 > ------------------------------------------------------- This SF.Net email is sponsored by: Sybase ASE Linux Express Edition - download now for FREE LinuxWorld Reader's Choice Award Winner for best database on Linux. http://ads.osdn.com/?ad_idU88&alloc_id=12065&op=3Dick _______________________________________________ GDAlgorithms-list mailing list GDAlgorithms-list@... https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list Archives: http://sourceforge.net/mailarchive/forum.php?forum_ida88 ```
 Re: [Algorithms] Animation mirroring From: Jonathan Blow - 2004-11-09 02:03:17 ```It's nothing to do with gimbal lock; you don't have gimbal lock with=20 quaternions. It just has to do with the fact that rotations do not=20 compose linearly. Anyway, if bone space is working for you, go ahead and keep doing it. =20 But at the very least I'd recommend sitting down and understanding how=20 bone space blending is different from object space blending. (Just=20 write the math for what the orientation of a leaf bone is for each case,=20 and think about what happens as your interpolation parameter goes from 0=20 to 1). Mike Krazanowski wrote: >Isn't this the result of the gimbal-lock problem? Or have I missed >something? >I believe that we are blending between the animations by slerping >between each bone's quaternions at this point. It seems to work for the >most part with hundreds of animations in use. > >// Mike > >-----Original Message----- >From: Jonathan Blow [mailto:jon@...]=20 >Sent: Monday, November 08, 2004 1:55 PM >To: gdalgorithms-list@... >Subject: Re: [Algorithms] Animation mirroring > >I want to interject with the comment that blending in bone space is not=20 >a good idea. You probably want to blend in object space. > >The reason is, because of rotations not commuting and all that,=20 >blending/interpolating between bone space rotations will often give you=20 >a final pose that is nowhere near either of the blend inputs. > >I suspect that you haven't seen this because you just haven't thrown a=20 >lot of data at your blend system yet (it's new?) > > > >Mike Krazanowski wrote: > > =20 > >>Hey,=20 >> >>I am new to this topic so please bear with me. >> >> >> >>We need to mirror our animations by a world-space plane. Our animation >>system stores key-frames with absolute time values and relative >> =20 >> >rotation > =20 > >>and translation components (relative to the bone's or hierarchy's >> =20 >> >parent > =20 > >>node). We have implemented a mirroring system that essentially >>transforms each animated bone to world space and then performs the >>mirror operation as a post process. Unfortunately, we also have an >>animation blending system that can operate entirely in bone space and >>therefore our animation system performs the blend op before the mirror >>op. This poses a problem when we need to blend an un-mirrored >> =20 >> >animation > =20 > >>with a mirrored one. >> >> >> >>I have maintained that, because the mirror op is a world-space >>operation, the application of the mirroring on each bone must either be >>done in world-space or the op must be transformed to bone-space and >> =20 >> >then > =20 > >>applied. In either case the whole skeleton/hierarchy must be >>transformed to world-space at some point, or the mirror op needs to be >>transformed to bone space and propagated through the hierarchy to >>perform the mirror operation. >> >> >> >>Does anybody have any resources or better explanation of this problem?? >> >> >> >> >> >> >> >>------------------------------------------------------- >>This SF.Net email is sponsored by: >>Sybase ASE Linux Express Edition - download now for FREE >>LinuxWorld Reader's Choice Award Winner for best database on Linux. >>http://ads.osdn.com/?ad_idU88&alloc_id=12065&op=CCk >>_______________________________________________ >>GDAlgorithms-list mailing list >>GDAlgorithms-list@... >>https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list >>Archives: >>http://sourceforge.net/mailarchive/forum.php?forum_ida88 >> >>=20 >> >> =20 >> > > > >------------------------------------------------------- >This SF.Net email is sponsored by: >Sybase ASE Linux Express Edition - download now for FREE >LinuxWorld Reader's Choice Award Winner for best database on Linux. >http://ads.osdn.com/?ad_idU88&alloc_id=12065&op=3Dick >_______________________________________________ >GDAlgorithms-list mailing list >GDAlgorithms-list@... >https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list >Archives: >http://sourceforge.net/mailarchive/forum.php?forum_ida88 > > > > > >------------------------------------------------------- >This SF.Net email is sponsored by: >Sybase ASE Linux Express Edition - download now for FREE >LinuxWorld Reader's Choice Award Winner for best database on Linux. >http://ads.osdn.com/?ad_idU88&alloc_id=12065&op=CCk >_______________________________________________ >GDAlgorithms-list mailing list >GDAlgorithms-list@... >https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list >Archives: >http://sourceforge.net/mailarchive/forum.php?forum_ida88 > > =20 > ```
 RE: [Algorithms] Animation mirroring From: Tyson Jensen - 2004-11-09 01:32:58 ```True. But with the UV, that's exactly what we expect. If you look at text in a mirror, it's backwards. That's what's supposed to happen. You could have a mirrored texture to use with the mirrored character if you want the text to still read forwards. As for the backfacing, I hadn't considered that. That's a tougher nut. -----Original Message----- From: gdalgorithms-list-admin@... [mailto:gdalgorithms-list-admin@...] On Behalf Of Mike Krazanowski Sent: Monday, November 08, 2004 3:41 PM To: gdalgorithms-list@... Subject: RE: [Algorithms] Animation mirroring Performing the reflection at the root node does mirror the whole hierarchy if I remember correctly. Unfortunately, the mirror operation converts a right-handed matrix to a left-handed matrix and vice versa. Although, you will get an object that resembles your original object mirrored, the back face culling logic becomes inverted (and needs to be checked for and corrected in our engine) and the UV coordinates are also mirrored about that plane (a big problem for objects with un-mirror-able textures applied like text). =20 // Mike=20 -----Original Message----- From: Tyson Jensen [mailto:twjensen@...]=20 Sent: Monday, November 08, 2004 2:02 PM To: gdalgorithms-list@... Subject: RE: [Algorithms] Animation mirroring You need to transform all your bones to world space anyway in order to render the associated skin. Adding the transform to the very end seems a little unnatural to me, however. I would apply the mirror transform to the actor's local to world matrix (basically the root bone matrix), which then is multiplied through the joint chain for rendering. Of course, I'm assuming that you want to render this thing. If you need this for other reasons, just borrow the code from your rendering engine assuming that's already working. Our engine provides an API to get the "as rendered" transforms so that other subsystems can look at the bone locations and orientations in world coordinates. That's proved very convenient for those who don't really care about joint-chains and animation code but need to know something like "where's this guy's forearm bone right now?" -----Original Message----- From: gdalgorithms-list-admin@... [mailto:gdalgorithms-list-admin@...] On Behalf Of Mike Krazanowski Sent: Monday, November 08, 2004 11:28 AM To: gdalgorithms-list@... Subject: [Algorithms] Animation mirroring Hey,=20 I am new to this topic so please bear with me. =20 We need to mirror our animations by a world-space plane. Our animation system stores key-frames with absolute time values and relative rotation and translation components (relative to the bone's or hierarchy's parent node). We have implemented a mirroring system that essentially transforms each animated bone to world space and then performs the mirror operation as a post process. Unfortunately, we also have an animation blending system that can operate entirely in bone space and therefore our animation system performs the blend op before the mirror op. This poses a problem when we need to blend an un-mirrored animation with a mirrored one. =20 I have maintained that, because the mirror op is a world-space operation, the application of the mirroring on each bone must either be done in world-space or the op must be transformed to bone-space and then applied. In either case the whole skeleton/hierarchy must be transformed to world-space at some point, or the mirror op needs to be transformed to bone space and propagated through the hierarchy to perform the mirror operation. =20 Does anybody have any resources or better explanation of this problem?? =20 =20 ------------------------------------------------------- This SF.Net email is sponsored by: Sybase ASE Linux Express Edition - download now for FREE LinuxWorld Reader's Choice Award Winner for best database on Linux. http://ads.osdn.com/?ad_idU88&alloc_id=12065&op=3Dick _______________________________________________ GDAlgorithms-list mailing list GDAlgorithms-list@... https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list Archives: http://sourceforge.net/mailarchive/forum.php?forum_ida88 ------------------------------------------------------- This SF.Net email is sponsored by: Sybase ASE Linux Express Edition - download now for FREE LinuxWorld Reader's Choice Award Winner for best database on Linux. http://ads.osdn.com/?ad_idU88&alloc_id=12065&op=3Dick _______________________________________________ GDAlgorithms-list mailing list GDAlgorithms-list@... https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list Archives: http://sourceforge.net/mailarchive/forum.php?forum_ida88 ------------------------------------------------------- This SF.Net email is sponsored by: Sybase ASE Linux Express Edition - download now for FREE LinuxWorld Reader's Choice Award Winner for best database on Linux. http://ads.osdn.com/?ad_idU88&alloc_id=12065&op=3Dick _______________________________________________ GDAlgorithms-list mailing list GDAlgorithms-list@... https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list Archives: http://sourceforge.net/mailarchive/forum.php?forum_ida88 ```
 RE: [Algorithms] Animation mirroring From: Damyan Pepper - 2004-11-09 09:25:46 ```If you just want to mirror around one axis - say something that would make a left-turn animation become a right-turn animation then things can get a bit easier. Firstly, you'll need a way of mapping animation data to different bones. For example, the left hand should be doing what the right hand does when it is mirrored. If you have a quaternion (x,y,z,s) then you can 'mirror' it across the x-axis by doing (-x,y,z,-s). Then you need to actually do this to the animation data - this gets quite hairy since you need to make sure that when you mirror the animation you're doing it in the correct coordinate system. I expect this depends on where your blends happen, but it does eventually all boil down to algebra to work out. There's a wonderful special case though - if your bind pose has identity rotations for all bones then you can get away with just negating the x and s values as shown above. As I was implementing a more general case one that worked for arbitrary bind poses I ended up writing this to try and bring together some of the quaternion info on the net: http://www.damyan.demon.co.uk/quaternions.html > -----Original Message----- > From: gdalgorithms-list-admin@... > [mailto:gdalgorithms-list-admin@...]On > Behalf Of Mike > Krazanowski > Sent: 08 November 2004 19:28 > To: gdalgorithms-list@... > Subject: [Algorithms] Animation mirroring > > > Hey, > > I am new to this topic so please bear with me. > > > > We need to mirror our animations by a world-space plane. Our > animation > system stores key-frames with absolute time values and > relative rotation > and translation components (relative to the bone's or > hierarchy's parent > node). We have implemented a mirroring system that essentially > transforms each animated bone to world space and then performs the > mirror operation as a post process. Unfortunately, we also have an > animation blending system that can operate entirely in bone space and > therefore our animation system performs the blend op before the mirror > op. This poses a problem when we need to blend an > un-mirrored animation > with a mirrored one. > > > > I have maintained that, because the mirror op is a world-space > operation, the application of the mirroring on each bone must > either be > done in world-space or the op must be transformed to > bone-space and then > applied. In either case the whole skeleton/hierarchy must be > transformed to world-space at some point, or the mirror op needs to be > transformed to bone space and propagated through the hierarchy to > perform the mirror operation. > > > > Does anybody have any resources or better explanation of this > problem?? > > > > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: > Sybase ASE Linux Express Edition - download now for FREE > LinuxWorld Reader's Choice Award Winner for best database on Linux. > http://ads.osdn.com/?ad_idU88&alloc_id065&op=click > _______________________________________________ > GDAlgorithms-list mailing list > GDAlgorithms-list@... > https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_ida88 > ```