[GSoC 2011 - Accepted] Dual Quaternion Skinning

Threads related to Google Summer of Code
User avatar
masterfalcon
OGRE Team Member
OGRE Team Member
Posts: 4270
Joined: Sun Feb 25, 2007 4:56 am
Location: Bloomington, MN
x 126
Contact:

Re: [GSoC 2011 - Accepted] Dual Quaternion Skinning

Post by masterfalcon »

That resolves the errors but the animation is still not there.
mysterycoder
Google Summer of Code Student
Google Summer of Code Student
Posts: 169
Joined: Sat Dec 03, 2005 2:04 am
x 6

Re: [GSoC 2011 - Accepted] Dual Quaternion Skinning

Post by mysterycoder »

dark_sylinc wrote:One of your changes was causing VTF and HW_VTF to crash if using a base mesh that wasn't skeletally animated since findElementBySemantic( VES_BLEND_WEIGHTS ) returned a null pointer. Fixed. Just wanted to remember you VTF != Skeletal animation present
I'm seeing a shadow flicker too, in NewInstancing sample, D3D9 & OGL; which wasn't present before. Don't know if it's DQS related. I haven't found anything has actually changed, which is weird. My own game which uses PSSM shadows + instancing works fine though (NewInstancing demo uses FocusedShadowMapping).
Thanks for fixing that issue dark_sylinc. I noticed the shadow flickering as well, but I thought it was there before I added the dual quaternion skinning to the instancing.

@masterfalcon
I'll set up a build on Mac OS X soon and see if I can fix it.
As noted in the more recent posts, we were having trouble with GLSL after the merge into trunk. Also, array accessors in GLSL are column major where as in Cg they are row major, so you may have to swap the indices.
My Google summer of code 2011 topic: Dual Quaternion Skinning
My Google summer of code thread
My Google summer of code wiki page
mysterycoder
Google Summer of Code Student
Google Summer of Code Student
Posts: 169
Joined: Sat Dec 03, 2005 2:04 am
x 6

Re: [GSoC 2011 - Accepted] Dual Quaternion Skinning

Post by mysterycoder »

@masterfalcon
I've got a build of the 1_8 branch set up on OSX Lion and I can reproduce what you've reported. I'll try to take a look at the shaders tomorrow and see if I can fix it.
My Google summer of code 2011 topic: Dual Quaternion Skinning
My Google summer of code thread
My Google summer of code wiki page
User avatar
masterfalcon
OGRE Team Member
OGRE Team Member
Posts: 4270
Joined: Sun Feb 25, 2007 4:56 am
Location: Bloomington, MN
x 126
Contact:

Re: [GSoC 2011 - Accepted] Dual Quaternion Skinning

Post by masterfalcon »

I finally took a look at this last night. One of the main issue is that there are duplicates of some of the GLSL shaders in the RTShader folder.
mysterycoder
Google Summer of Code Student
Google Summer of Code Student
Posts: 169
Joined: Sat Dec 03, 2005 2:04 am
x 6

Re: [GSoC 2011 - Accepted] Dual Quaternion Skinning

Post by mysterycoder »

masterfalcon wrote:I finally took a look at this last night. One of the main issue is that there are duplicates of some of the GLSL shaders in the RTShader folder.
Thanks for looking at it, that indeed seems to be largely the issue. I looked using gDebugger and the wrong shaders were being loaded. :)

I added a patch to the tracker that should fix most of the problems with GLSL and partially fixes the GLSL RTSS support; the patch id is: 3457426.

Just a side note, and perhaps I'm not setting the right options, but Ogre seems to give much less information about compilation problems for GLSL shaders, especially if you link shaders, compared to gDebugger. It also crashes hard if there are any problems.
My Google summer of code 2011 topic: Dual Quaternion Skinning
My Google summer of code thread
My Google summer of code wiki page
User avatar
masterfalcon
OGRE Team Member
OGRE Team Member
Posts: 4270
Joined: Sun Feb 25, 2007 4:56 am
Location: Bloomington, MN
x 126
Contact:

Re: [GSoC 2011 - Accepted] Dual Quaternion Skinning

Post by masterfalcon »

Thanks for the patch. Out of curiosity, does the GLSL(non-RTSS) skinning work for you? On OS X(both ATI and NVIDIA), it still doesn't work right.
mysterycoder
Google Summer of Code Student
Google Summer of Code Student
Posts: 169
Joined: Sat Dec 03, 2005 2:04 am
x 6

Re: [GSoC 2011 - Accepted] Dual Quaternion Skinning

Post by mysterycoder »

It works for me under Linux. But I've tried it now on Mac OSX 10.7 with an Nvidia 9600M and I have the same troubles under both Cg and GLSL.

For Cg, I'm not really sure what the issue is. As you mentioned previously, only the top vertices of the models were being transformed. Based on the way the skeletal animation demo looks under the dual quaternion skinning, I'm thinking that there is some issue with the weighting of vertices.

For GLSL, after applying the patch, the issue with GLSL is two-fold. First is the issue that darksylinc brought up about adjointTransposeMatrix. Second is that the scaling matrix for the two phase skinning was causing the model to deform. I'm not sure why it was causing this as it was acting fine under Linux with GLSL. Perhaps some transposing settings aren't the same between the platforms?

I fixed the syntax for the adjointTransposeMatrix issue, and I fixed the deformation issue by passing the scaling matrix as an array of vec4s and constructing the matrices from that. The patch number is: 3460419.
My Google summer of code 2011 topic: Dual Quaternion Skinning
My Google summer of code thread
My Google summer of code wiki page
User avatar
masterfalcon
OGRE Team Member
OGRE Team Member
Posts: 4270
Joined: Sun Feb 25, 2007 4:56 am
Location: Bloomington, MN
x 126
Contact:

Re: [GSoC 2011 - Accepted] Dual Quaternion Skinning

Post by masterfalcon »

Great work! Looks good. The spine on the left still doesn't work, but the DQ one does now.
mysterycoder
Google Summer of Code Student
Google Summer of Code Student
Posts: 169
Joined: Sat Dec 03, 2005 2:04 am
x 6

Re: [GSoC 2011 - Accepted] Dual Quaternion Skinning

Post by mysterycoder »

Thanks :)

However, on mine the non-DQ spine is behaving correctly. I have the v1-8 branch compiled with both of my patches applied, without the RTSS component and the Cg plugin. How is your's setup?

Also, any thoughts on the different Cg behavior under Mac OS X?
My Google summer of code 2011 topic: Dual Quaternion Skinning
My Google summer of code thread
My Google summer of code wiki page
User avatar
masterfalcon
OGRE Team Member
OGRE Team Member
Posts: 4270
Joined: Sun Feb 25, 2007 4:56 am
Location: Bloomington, MN
x 126
Contact:

Re: [GSoC 2011 - Accepted] Dual Quaternion Skinning

Post by masterfalcon »

Oh sorry, I had something messed up in my config locally. It all works as it should.

I'm not sure regarding the Cg shaders. I've never looked into the plugin code. Maybe something has changed in the frameworks' API somewhat recently? Just a wild guess.
mysterycoder
Google Summer of Code Student
Google Summer of Code Student
Posts: 169
Joined: Sat Dec 03, 2005 2:04 am
x 6

Re: [GSoC 2011 - Accepted] Dual Quaternion Skinning

Post by mysterycoder »

That's good, I'm glad it's working as it should.

I've been trying to figure out whats going on with the Cg shaders, but to no avail thus far. I removed all Cg related frameworks from my computer, then installed the latest 3.0 release. I also ran the shaders manually through the cgc compiler in various profiles. I caught some warnings in the shaders and profiles that shouldn't be used in the program definitions and I've addressed them in a patch with id: 3460611.

I'll begin to look into the plugin code for Cg, but I feel as if the API should be fairly consistent across the platforms. I wonder if it is just a bug in the Cg implementation.
My Google summer of code 2011 topic: Dual Quaternion Skinning
My Google summer of code thread
My Google summer of code wiki page
noorus
Halfling
Posts: 75
Joined: Wed Apr 20, 2011 9:55 pm
Location: Helsinki, Finland
x 3

Re: [GSoC 2011 - Accepted] Dual Quaternion Skinning

Post by noorus »

Hi, I just want to make this somewhat useless post here to congratulate you :)
I only now got to see this in action after I compiled a new Ogre for myself, and the improvement is really remarkable.
I feel like your work on this feature should have received more recognition than it has so far.
No problems whatsoever on my nvidia/dx9 setup either.
Good job 8)
Creator of Nice Input Library, for your advanced input needs.
Image
Post Reply