## vertex weighting

Member
Posts: 157
Joined: 2002.12
Post: #1
Hello my forum!

Question:
How do I apply let's say 50% of a rotation matrix to a vertex?

I'm trying to get a skeleton deformer working and I need to apply x% of a rotation to vertices depending on matrix influence on it.

Luminary
Posts: 5,143
Joined: 2002.04
Post: #2
Don't use matrices to represent rotations.

Look into Quaternions. They're probably the easiest way to do spherical linear interpolation.
Member
Posts: 157
Joined: 2002.12
Post: #3
I'm using quaternions for the rotations.

The skeleton is pretty much working the issue I have is that every bone has absolute control over the vertices attached to it.

So I want to apply 50% of matrix A rotation, and 50% of matrix B rotation to the vertices close to joint formed by (A-B)
Luminary
Posts: 5,143
Joined: 2002.04
Post: #4
Oh, right, sorry

It should look OK if you just use the weighted sum of the transformed vertices, ie 0.5 * (M0 * v) + 0.5 * (M1 * v)
Member
Posts: 157
Joined: 2002.12
Post: #5
I'll try that, thanks...
Oldtimer
Posts: 834
Joined: 2002.09
Post: #6
Then, how to multiply a matrix with a scalar? :ohmy: I would have a lot of use for something like that...
Member
Posts: 157
Joined: 2002.12
Post: #7
both seem to work