Re: Pelvis transformation during animation
"Nathan Martz" <[email protected]> Wed, 14 Nov 2007 15:57:04 -0800
| Newsgroups | gmane.games.devel.general |
|---|---|
| Message-ID | <[email protected]> |
This is a multi-part message in MIME format. --===============1985016689== Content-class: urn:content-classes:message Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C8271A.0E73AEE3" This is a multi-part message in MIME format. ------_=_NextPart_001_01C8271A.0E73AEE3 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable It sounds like you are trying to both drive the character's game/logical position by movement of the root joint and also to use it to skin/deform the characters. I would suggest that you use different joints for each purpose. In our engine, we have a joint that we call the delta-trans that indicates the character's position and rotation deltas for each frame. That has a child that we call the "Root" joint which is the basemost deforming joint. At munge time (after export but before the game gets it) we extract data from the delta-trans and then strip that joint out of the skeleton. So, in this kind of situation, something like a backflip might simply translate the delta-trans backwards a bit while the root and other joints are doing all manner of spins and translation. I believe that's pretty much how most people do root motion, and a Google search for "root motion" will probably turn up some good info. =20 -Nathan =20 -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of pontus birgersson Sent: Wednesday, November 14, 2007 3:32 PM To: [email protected] Subject: [GD-General] Pelvis transformation during animation =20 Hi, =20 I have encountered an issue that has been a hassle for my current game project as well as for previous ones and I'd like to hear your take on it. =20 The issue surrounds transforming i.e. rotating and translating the pelvis joint during animation. We are creating a fighting game where our artists would like to be able to translate and rotate the entire character in a non-linear fashion for some animation (say an attack where the character turns around and moves forward). =20 My first approach to this was to let the transformation be part of pelvis but this causes an issue due to hardware skinning since the world position and orientation in game logic won't incorporate that particular transformation seeing as how it is added in the vertex shader. =20 Next I tried to extract the transformations into separate rotations and transformations for each key frame and just add the difference between key frames to world position and orientation. This solution was flawed because it also extracts the pelvis translation on the Y axis and adds that, making the character float upwards. I guess I could keep working on this solution but it seems as a bad way to go, do you guys have a better idea or perhaps a standardized way to do this? =20 Regards, =20 Pontus Birgersson=20 Shortfuse entertainment =20 ________________________________ Express yourself instantly with MSN Messenger! MSN Messenger <http://clk.atdmt.com/AVE/go/onm00200471ave/direct/01/>=20 ------_=_NextPart_001_01C8271A.0E73AEE3 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable <html xmlns:v=3D"urn:schemas-microsoft-com:vml" = xmlns:o=3D"urn:schemas-microsoft-com:office:office" = xmlns:w=3D"urn:schemas-microsoft-com:office:word" = xmlns=3D"http://www.w3.org/TR/REC-html40"> <head> <meta http-equiv=3DContent-Type content=3D"text/html; = charset=3Dus-ascii"> <meta name=3DProgId content=3DWord.Document> <meta name=3DGenerator content=3D"Microsoft Word 10"> <meta name=3DOriginator content=3D"Microsoft Word 10"> <link rel=3DFile-List href=3D"cid:[email protected]"> <link rel=3DEdit-Time-Data href=3D"cid:[email protected]"> <!--[if !mso]> <style> v\:* {behavior:url(#default#VML);} o\:* {behavior:url(#default#VML);} w\:* {behavior:url(#default#VML);} .shape {behavior:url(#default#VML);} </style> <![endif]--><!--[if gte mso 9]><xml> <o:OfficeDocumentSettings> <o:DoNotRelyOnCSS/> </o:OfficeDocumentSettings> </xml><![endif]--><!--[if gte mso 9]><xml> <w:WordDocument> <w:SpellingState>Clean</w:SpellingState> <w:GrammarState>Clean</w:GrammarState> <w:DocumentKind>DocumentEmail</w:DocumentKind> <w:EnvelopeVis/> <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel> </w:WordDocument> </xml><![endif]--> <style> <!-- /* Font Definitions */ @font-face {font-family:Tahoma; panose-1:2 11 6 4 3 5 4 4 2 4; mso-font-charset:0; mso-generic-font-family:swiss; mso-font-pitch:variable; mso-font-signature:1627421319 -2147483648 8 0 66047 0;} @font-face {font-family:Verdana; panose-1:2 11 6 4 3 5 4 4 2 4; mso-font-charset:0; mso-generic-font-family:swiss; mso-font-pitch:variable; mso-font-signature:536871559 0 0 0 415 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-parent:""; margin:0in; margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:12.0pt; font-family:"Times New Roman"; mso-fareast-font-family:"Times New Roman";} a:link, span.MsoHyperlink {color:blue; text-decoration:underline; text-underline:single;} a:visited, span.MsoHyperlinkFollowed {color:blue; text-decoration:underline; text-underline:single;} p {mso-margin-top-alt:auto; margin-right:0in; mso-margin-bottom-alt:auto; margin-left:0in; mso-pagination:widow-orphan; font-size:12.0pt; font-family:"Times New Roman"; mso-fareast-font-family:"Times New Roman";} p.NormalWeb1, li.NormalWeb1, div.NormalWeb1 {mso-style-name:"Normal \(Web\)1"; margin:0in; margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:12.0pt; font-family:"Times New Roman"; mso-fareast-font-family:"Times New Roman";} span.EmailStyle19 {mso-style-type:personal-reply; mso-style-noshow:yes; mso-ansi-font-size:10.0pt; mso-bidi-font-size:10.0pt; font-family:Arial; mso-ascii-font-family:Arial; mso-hansi-font-family:Arial; mso-bidi-font-family:Arial; color:navy;} span.SpellE {mso-style-name:""; mso-spl-e:yes;} span.GramE {mso-style-name:""; mso-gram-e:yes;} @page Section1 {size:8.5in 11.0in; margin:1.0in 1.25in 1.0in 1.25in; mso-header-margin:.5in; mso-footer-margin:.5in; mso-paper-source:0;} div.Section1 {page:Section1;} --> </style> <!--[if gte mso 10]> <style> /* Style Definitions */=20 table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman";} </style> <![endif]--> </head> <body lang=3DEN-US link=3Dblue vlink=3Dblue style=3D'tab-interval:.5in'> <div class=3DSection1> <p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span = style=3D'font-size: 10.0pt;font-family:Arial;color:navy'>It sounds like you are trying to = both drive the character’s game/logical position by movement of the = root joint and also to use it to skin/deform the characters. I would suggest that = you use different joints for each purpose. In our engine, we have a joint that = we call the delta-trans that indicates the character’s position and = rotation deltas for each frame. That has a child that we call the = “Root” joint which is the <span class=3DSpellE>basemost</span> deforming joint. = At <span class=3DSpellE>munge</span> time (after export but before the game gets = it) we extract data from the delta-trans and then strip that joint out of the skeleton. = So, in this kind of situation, something like a <span = class=3DSpellE>backflip</span> might simply translate the delta-trans backwards a bit while the root = and other joints are doing all manner of spins and translation. I believe = that’s pretty much how most people do root motion, and a <span = class=3DSpellE>Google</span> search for “root motion” will probably turn up some good = info.<o:p></o:p></span></font></p> <p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span = style=3D'font-size: 10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p> <p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span = style=3D'font-size: 10.0pt;font-family:Arial;color:navy'>-Nathan<o:p></o:p></span></font></p>= <p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span = style=3D'font-size: 10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p> <p class=3DMsoNormal style=3D'margin-left:.5in'><font size=3D2 = face=3DTahoma><span style=3D'font-size:10.0pt;font-family:Tahoma'>-----Original = Message-----<br> <b><span style=3D'font-weight:bold'>From:</span></b> [email protected] [mailto:[email protected]] <b><span style=3D'font-weight:bold'>On Behalf Of </span></b>pontus birgersson<br> <b><span style=3D'font-weight:bold'>Sent:</span></b> Wednesday, November = 14, 2007 3:32 PM<br> <b><span style=3D'font-weight:bold'>To:</span></b> = [email protected]<br> <b><span style=3D'font-weight:bold'>Subject:</span></b> [GD-General] = Pelvis transformation during animation</span></font></p> <p class=3DMsoNormal style=3D'margin-left:.5in'><font size=3D3 = face=3D"Times New Roman"><span style=3D'font-size:12.0pt'><o:p> </o:p></span></font></p> <p class=3DNormalWeb1 style=3D'margin-left:.5in;background:white'><font = size=3D1 color=3D"#444444" face=3DVerdana><span lang=3DEN-GB = style=3D'font-size:8.5pt; font-family:Verdana;mso-bidi-font-family:Tahoma;color:#444444;mso-ansi-la= nguage: EN-GB'>Hi,<o:p></o:p></span></font></p> <p class=3DNormalWeb1 style=3D'margin-left:.5in;background:white'><font = size=3D1 color=3D"#444444" face=3DVerdana><span lang=3DEN-GB = style=3D'font-size:8.5pt; font-family:Verdana;mso-bidi-font-family:Tahoma;color:#444444;mso-ansi-la= nguage: EN-GB'> <o:p></o:p></span></font></p> <p class=3DNormalWeb1 style=3D'margin-left:.5in;background:white'><font = size=3D1 color=3D"#444444" face=3DVerdana><span lang=3DEN-GB = style=3D'font-size:8.5pt; font-family:Verdana;mso-bidi-font-family:Tahoma;color:#444444;mso-ansi-la= nguage: EN-GB'>I have encountered an issue that has been a hassle for my current = game project as well as for previous ones and I'd like to hear your take on = it.<o:p></o:p></span></font></p> <p class=3DNormalWeb1 style=3D'margin-left:.5in;background:white'><font = size=3D1 color=3D"#444444" face=3DVerdana><span lang=3DEN-GB = style=3D'font-size:8.5pt; font-family:Verdana;mso-bidi-font-family:Tahoma;color:#444444;mso-ansi-la= nguage: EN-GB'> <o:p></o:p></span></font></p> <p class=3DNormalWeb1 style=3D'margin-left:.5in;background:white'><font = size=3D1 color=3D"#444444" face=3DVerdana><span lang=3DEN-GB = style=3D'font-size:8.5pt; font-family:Verdana;mso-bidi-font-family:Tahoma;color:#444444;mso-ansi-la= nguage: EN-GB'>The issue surrounds transforming i.e. rotating and translating = the pelvis joint during animation. We are creating a fighting game where our artists would like to be able to translate and rotate the entire = character in a non-linear fashion for some animation (say an attack where the character = turns around and moves forward).<o:p></o:p></span></font></p> <p class=3DNormalWeb1 style=3D'margin-left:.5in;background:white'><font = size=3D1 color=3D"#444444" face=3DVerdana><span lang=3DEN-GB = style=3D'font-size:8.5pt; font-family:Verdana;mso-bidi-font-family:Tahoma;color:#444444;mso-ansi-la= nguage: EN-GB'> <o:p></o:p></span></font></p> <p class=3DNormalWeb1 style=3D'margin-left:.5in;background:white'><font = size=3D1 color=3D"#444444" face=3DVerdana><span lang=3DEN-GB = style=3D'font-size:8.5pt; font-family:Verdana;mso-bidi-font-family:Tahoma;color:#444444;mso-ansi-la= nguage: EN-GB'>My first approach to this was to let the transformation be part = of pelvis but this causes an issue due to hardware skinning since the world position and orientation in game logic won't incorporate that particular transformation seeing as how it is added in the vertex = shader.<o:p></o:p></span></font></p> <p class=3DNormalWeb1 style=3D'margin-left:.5in;background:white'><font = size=3D1 color=3D"#444444" face=3DVerdana><span lang=3DEN-GB = style=3D'font-size:8.5pt; font-family:Verdana;mso-bidi-font-family:Tahoma;color:#444444;mso-ansi-la= nguage: EN-GB'> <o:p></o:p></span></font></p> <p class=3DNormalWeb1 style=3D'margin-left:.5in;background:white'><font = size=3D1 color=3D"#444444" face=3DVerdana><span lang=3DEN-GB = style=3D'font-size:8.5pt; font-family:Verdana;mso-bidi-font-family:Tahoma;color:#444444;mso-ansi-la= nguage: EN-GB'>Next I tried to extract the transformations into separate = rotations and transformations for each key frame and just add the difference between = key frames to world position and orientation. This solution was flawed = because it also extracts the pelvis translation on the Y axis and adds that, making = the character float upwards. I guess I could keep working on this solution = but it seems as a bad way to go, do you guys have a better idea or perhaps a standardized way to do this?</span></font><font size=3D2 = face=3DTahoma><span style=3D'font-size:10.0pt;font-family:Tahoma'><o:p></o:p></span></font></= p> <p class=3DNormalWeb1 style=3D'margin-left:.5in;background:white'><font = size=3D2 face=3DTahoma><span = style=3D'font-size:10.0pt;font-family:Tahoma'> </span></font><font size=3D1 color=3D"#444444" face=3DVerdana><span lang=3DEN-GB = style=3D'font-size:8.5pt; font-family:Verdana;mso-bidi-font-family:Tahoma;color:#444444;mso-ansi-la= nguage: EN-GB'><o:p></o:p></span></font></p> <p class=3DNormalWeb1 style=3D'margin-left:.5in;background:white'><font = size=3D1 color=3D"#444444" face=3DVerdana><span lang=3DEN-GB = style=3D'font-size:8.5pt; font-family:Verdana;mso-bidi-font-family:Tahoma;color:#444444;mso-ansi-la= nguage: EN-GB'>Regards,</span></font><font size=3D2 face=3DTahoma><span = style=3D'font-size: 10.0pt;font-family:Tahoma'><o:p></o:p></span></font></p> <p class=3DNormalWeb1 style=3D'margin-left:.5in;background:white'><font = size=3D2 face=3DTahoma><span = style=3D'font-size:10.0pt;font-family:Tahoma'> </span></font><font size=3D1 color=3D"#444444" face=3DVerdana><span lang=3DEN-GB = style=3D'font-size:8.5pt; font-family:Verdana;mso-bidi-font-family:Tahoma;color:#444444;mso-ansi-la= nguage: EN-GB'><o:p></o:p></span></font></p> <p class=3DNormalWeb1 = style=3D'margin-left:.5in;background:white'><st1:country-region = u1:st=3D"on"><st1:place u1:st=3D"on"><font size=3D1 color=3D"#444444" face=3DVerdana><span lang=3DEN-GB = style=3D'font-size:8.5pt; font-family:Verdana;mso-bidi-font-family:Tahoma;color:#444444;mso-ansi-la= nguage: EN-GB'>Pontus</st1:place></st1:country-region> Birgersson = <o:p></o:p></span></font></p> <p class=3DNormalWeb1 style=3D'margin-left:.5in;background:white'><font = size=3D1 color=3D"#444444" face=3DVerdana><span lang=3DEN-GB = style=3D'font-size:8.5pt; font-family:Verdana;mso-bidi-font-family:Tahoma;color:#444444;mso-ansi-la= nguage: EN-GB'>Shortfuse entertainment</span></font><font size=3D2 = face=3DTahoma><span style=3D'font-size:10.0pt;font-family:Tahoma'><o:p></o:p></span></font></= p> <p class=3DMsoNormal style=3D'margin-left:.5in'><font size=3D2 = face=3DTahoma><span style=3D'font-size:10.0pt;font-family:Tahoma'><o:p> </o:p></span></f= ont></p> <div class=3DMsoNormal align=3Dcenter = style=3D'margin-left:.5in;text-align:center'><font size=3D2 face=3DTahoma><span = style=3D'font-size:10.0pt;font-family:Tahoma'> <hr size=3D2 width=3D"100%" align=3Dcenter> </span></font></div> <p class=3DMsoNormal style=3D'margin-left:.5in'><font size=3D2 = face=3DTahoma><span style=3D'font-size:10.0pt;font-family:Tahoma'>Express yourself instantly = with MSN Messenger! <a = href=3D"http://clk.atdmt.com/AVE/go/onm00200471ave/direct/01/" target=3D"_new">MSN Messenger</a><o:p></o:p></span></font></p> </div> </body> </html> =00 ------_=_NextPart_001_01C8271A.0E73AEE3-- --===============1985016689== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ --===============1985016689== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Gamedevlists-general mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/gamedevlists-general Archives: http://sourceforge.net/mailarchive/forum.php?forum_id=557 --===============1985016689==--