[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Vertex blending.

On 30-Mar-2000 Keith Lucas wrote:
> OK, I've got a skeleton system, and I'm trying to get the vertex blending to
> do
> skinning. However....
> I can't seem to get it working right.
> For each bone in the skeleton, I'm generating a transformation matrix - this
> all
> works. A skin vertex can be attached to one or more of these. "One" works
> fine.
> The "more" version works, and it does what I'd intellectually expect it to
> do,
> but not what the goal is.
> The calculations for each of the vertices are just to multiply the position
> of
> the vertex relative to the bone by the bone transformation for each bone
> mentioned, followed by a scale factor, and then sum these.
> The problem is that the result doesn't quite do what it ought to:
>                      when the "elbow" is straight, all three vertices      |
>        <- lie on top of each other.
> +-----+-----+      <- this is a bone.
> When the elbow bends, two "single bone" verticies move as expected, but the
> elbow vertex blended from them lies on a line between them...
>      *
>      | *
>      | |*
>      ||/
>      |/
> -----*           (dammit this is hard to draw in ASCII)
>       \
>        \
>         \
>          \
> rather than "bulging out" if you see what I mean. I'd expect, the surface
> produced by these blended vertexes to form a curve in the limit, whereas they
> form a line connecting the single-boned vertexes.
> Basically, treating the verticies as vectors from a centre of rotation, the
> single bone verticies have their lengths preserved ( which one would expect)
> but
> the blended ones don't.
> Should I be fixing this by post-scaling those values (which isn't actually
> very
> easy ) or am I doing something wrong at a deeper level?
> (Or have I not asked this very coherently?)

I think I see what you mean...

normalizing the vectors as the final calculation will produce equal vectors,
but may produce some distortion at the joints... depending on what you're using
the bone system for, it may be ok :) If you're modeling a human (or other bony
creature), then the final vector probably SHOULD be longer on more extreme

Is the generated vector replacing, or supplementing the existing vertices? For
visual quality, it should be supplementing I think

        -Erik <erik@smluc.org> [http://math.smsu.edu/~br0ke]

The opinions expressed by me are not necessarily opinions. In all
probability, they are random rambling, and to be ignored. Failure to ignore
may result in severe boredom or confusion. Shake well before opening. Keep

To unsubscribe, e-mail: linuxgames-unsubscribe@sunsite.auc.dk
For additional commands, e-mail: linuxgames-help@sunsite.auc.dk