
Show HN: Skeletal Animation in Your Browser via Dual Quaternion Linear Blending - chinedufn
http://chinedufn.github.io/collada-dae-parser/
======
eriknstr
Neat demo. I have a couple of suggestions for camera control:

1\. Allow the use of the mouse for camera control.

2\. Use up/down arrows for rotation similar to what you do with left/right and
have separate keys control zoom.

~~~
chinedufn
Thanks!

Ah yes great suggestions. Hastily threw the controls in a couple months ago
and they're sure due for an update

( PR's welcome :) )

~~~
chombier
Especially needed since you can build a nice mouse trackball using dual
quaternion exponential :)

~~~
chinedufn
ha this calls for an obligatory "PR's welcome :)"

------
santaclaus
Super cool! Any chance that you'll add OCR skinning [1]? It looks really cool,
and seems to get the best of both linear blend and dual quaternion skinning!

[1] [https://www.disneyresearch.com/publication/skinning-with-
opt...](https://www.disneyresearch.com/publication/skinning-with-optimized-
cors/)

~~~
chinedufn
Thanks!

So admittedly I only heard of DLB a few weeks ago, and OCR skinning 10 seconds
ago :)

But this looks pretty damn cool. Thank you so much for the link, I'm
definitely going to read this paper and consider it for a standalone skeletal
animation library that I've started working on

------
pzone
Dual quaternion skinning seems to have failed to catch on. Support was removed
from Unreal Engine for example. Why is this?

~~~
chinedufn
Ah good question.

So I was using linear blend skinning and had those horrid artifacts.

Google.com told me that dual quaternion skinning was the solution, so more or
less blindly went with that.

santaclaus mentioned OCR in another comment, so I'll be reading up on that

------
Jasper_
Why not use the standard weighted matrix blending? What does the quaternion
approach provide?

~~~
chinedufn
So the problem with blending matrices is that you are not guaranteed to get a
rigid transform (you might introduce scaling, for example). You are also not
guaranteed to get the shortest path between your start and end matrices.

So you'll often end up with weird stretching and other artifacts when you
blend your matrices.

Dual quaternions are guaranteed to produce rigid transforms when blended.
You're also guaranteed to get the shortest path when blending.

If you checkout an older commit in the repo such as -
fe7cba263cc4f0ecc3ed96fb9288ed17469dd539 and `npm run demo` you'll see an
example of the problem with matrix linear blending.

You can also read more about this in "Skinning with Dual Quaternions" \-
[https://www.cs.utah.edu/~ladislav/kavan07skinning/kavan07ski...](https://www.cs.utah.edu/~ladislav/kavan07skinning/kavan07skinning.pdf)

~~~
notyourwork
Probably one of the best responses to that type of question. Explanation,
reasoning for your decision along with a commit referenced to investigate
further. Good stuff and great demo, thanks for sharing!

~~~
chinedufn
You're too kind! Thanks!

------
IanCal
I'm just getting an error in chrome

> Uncaught TypeError: Cannot read property 'clearColor' of null

I'll check back again later though, this sounds cool.

~~~
chinedufn
uh oh :(

Well if it still doesn't work, feel totally free to try it locally:

```

git clone [https://github.com/chinedufn/collada-dae-
parser](https://github.com/chinedufn/collada-dae-parser)

cd collada-dae-parser

npm install

npm run demo

```

------
sazers
Smooth movement anyway.

