|
|
In article <3a6227e4$1@news.povray.org>, "Rune"
<run### [at] inamecom> wrote:
> Let me see if I understand your storing system.
> There's an array full of bone-id/weight pairs with no duplicates.
> Each element in the array stores exactly one bone-id/weight pair.
> For each vertex in the mesh there's one or several pointers
> bone-id/weight pairs.
> Is that right?
Close. There is also an array of bones themelves, the bone IDs are just
indexes for this array. And each vertex has an array of indexes for the
array containing the bone ID/weight pairs.
> What I don't understand is how it makes sense to store individual
> weights.
> The weights are *relative to other weights* so storing just one
> bone-id/weight pair at a time makes no sense.
> Or does it? Can you explain?
The weights for each vertex will always total to 1, is that what you
mean?
The weight value determines the influence of a specific bone, right? So
it makes sense to pair them up..."xx% of the influence comes from y
bone". There will be duplicates in this information, especially when
several vertices belong to one bone and only that bone, so those
duplicates can be eliminated by making a separate list of data pairs and
referring to the pairs in that list by ID number.
I'm not really certain what you are asking...each vertex is affected by
each bone that "owns" it by a specific amount depending on proximity to
that bone and other bones that "own" it, right? POV would calculate the
effect of each bone, and add the bone ID and weight to the array for
that vertex.
> I know! I already mentio- ... Never mind.
Er, ok. :-)
> Anyway, the data would be stored as a part of the scene/include file,
> just like mesh vertices are, right? But how would the data be
> generated?
>
> We agree that fields could initialise the data, but how would this be
> done?
> External utility? I don't think that's a good idea.
No, it would be done in the parsing stage. The bone and vertex
information would be parsed in, and the bone fields would be used to
"fill in" the unspecified weights. The data would then be passed to the
code that actually moved the vertices, which won't care *how* the data
was generated. That bit of code (and the one-field code) may be useful
somewhere else separately, no real reason to make them integral with
each other. It should also be a little easier to maintain.
From the user's perspective, it just lets them specify everything,
nothing, or just a few points, while POV automatically computes anything
they leave out with no extra syntax.
--
Christopher James Huff
Personal: chr### [at] maccom, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tagpovrayorg, http://tag.povray.org/
<><
Post a reply to this message
|
|