Hi,

Thanks heaps for that link. I really seem to have trouble finding
these things! I guess it makes sense to just morph after each frame
has been updated (and animate both the "normal" mesh and the "target"
mesh).

I'll post a small example in reply to this (when it's working
correctly) in case anyone else is interested, but the above links will
point you in the right direction.

One thing I did do, to save bandwidth, was just load the Mesh data as
a string (for the target clip) and inject this XML into the correct
place in the original Collada file. This means I didn't need to load
all the joint and animation info twice. Big saving!

Thanks again!


On Apr 8, 10:11 pm, katopz <[email protected]> wrote:
> and here's 2nd approach 
> :)http://away3d.googlecode.com/svn/branches/lite/bin/ExColladaAnimation...
>
> src is same old placehttp://away3d.googlecode.com/svn/branches/lite
>
> after modify it, next step is pack it as MDZ
> just make sure you export modified vertices there
> i'm sure that some mod need in MDZBuilder for this step
>
> i 'll leave this fun part to you then ;)
>
> hth
>
> On 8 April 2010 15:49, katopz <[email protected]> wrote:
>
>
>
>
>
> > i've 2 approach in my head
> > 1. mod internal class @see away3dlite.animators.bones.SkinVertex
> >                public function update():void
> >                {
> >                        if (_mesh && !_mesh.visible)
> >                                return;
>
> >                        //reset values
> >                        _output = new Vector3D();
>
> >                        _i = weights.length;
> >                        while (_i--)
> >                        {
> >                                _position =
> > controllers[_i].transformMatrix3D.transformVector(_baseVertex);
> >                                _position.scaleBy(weights[_i]);
> >                                _output = _output.add(_position);
> >                        }
> >                        var _startIndex:int;
> >                        for each (_startIndex in _startIndices)
> >                        {
> >                                _vertices[int(_startIndex)] = _output.x;
> >                                _vertices[int(_startIndex + 1)] = _output.y;
> >                                _vertices[int(_startIndex + 2)] = _output.z;
> >                        }
> >                }
>
> > try mod afte line 74
>
> > _position.scaleBy(weights[_i]);
>
> > with your bend modifier
>
> > 2. modify after vertices bonesAnimator is updated
> > just loop all mesh1 vertices1 and interpolate it with mesh2 vertices2
>
> > just quick idea, some test need :)
>
> > On 08/04/2010, tarwin <[email protected]> wrote:
> > > Yeah, I had a horrible feeling it would be one or the other. I've set
> > > up this whole thing to be able to do both, and now it's seems I'm
> > > stuck between a rock and a hard place. Should have done more simple
> > > tests to begin with - oh well.
>
> > > So, what kind of updates would be needed to combine this
> > > functionality. Would be willing to pay for this addition (if it is
> > > feasible). If anyone's interested please message me off list (you too
> > > Katopz if you've got time).
>
> > > I'm pretty sure this should be possible without too much more
> > > complexity because 3d modellers do it with combining a morpher under a
> > > skin modifier, and as far as I know there is no added complexity
> > > because you're still affecting the same verts with the same bones,
> > > they just start at different positions. I'm not even talking about a
> > > dynamic morpher that changing while an animations is playing (I guess
> > > an update per frame) but one that changes the original model vert
> > > positions.
>
> > > Anyway, thanks for the reply.
>
> > > On Apr 8, 12:53 am, katopz <[email protected]> wrote:
> > >> Hey tarwin
>
> > >> this fun is start from Collada parser
>
> > >> @see buildAnimations via Collada.as
>
> > >> animationLibrary : animationData
> > >>            |
> > >>            |
> > >>            |              channel : transform type (translate, rotate,
> > >> ...)
> > >> bonesAnimator  /
> > >>            |            \
> > >>            |              skinControllers : skinVertices, joint
> > >>            |
> > >>        bone : joint : transformMatrix3D
>
> > >> and then in render loop we just
>
> > >> 1. update bonesAnimator by current timer
> > >> 2. update each channel
> > >> 3. update each skinControllers
> > >> 4. update each skinVertices
>
> > >> Morph animation for collada didn't exist yet btw
> > >> and not sure what are you trying to do exactly?
> > >> seem like you try to Morph vertices after doing bone animation?
>
> > >> I think you have to choose one :)
>
> > >> hth
>
> > >> On 7 April 2010 19:52, tarwin <[email protected]> wrote:
>
> > >> > Hi all.
>
> > >> > Has anyone tried using the Morpher in connection with Collada? I'm not
> > >> > sure if it would actually work (it will probably give onerous results)
> > >> > but I'm trying to find out how I can change the base Mesh that is used
> > >> > by the BonesAnimator to do the animation. I'm a little bit hazy on
> > >> > exactly how it is all connected - BonesAnimator, Channel,
> > >> > SkinController, SkinVertex and the Mesh itself - and any insight into
> > >> > that would be a great help.
>
> > >> > Thanks great Internet hive mind!
>
> > >> > --
> > >> > To unsubscribe, reply using "remove me" as the subject.
>
> > >> --
> > >> Regards
> > >> -----------------------------------------------------------
> > >> katopz,http://sleepydesign.com
> > >> Away3D and JigLibFlash Developer Team
>
> > --
> > Regards
> > -----------------------------------------------------------
> > katopz,http://sleepydesign.com
> > Away3D and JigLibFlash Developer Team
>
> --
> Regards
> -----------------------------------------------------------
> katopz,http://sleepydesign.com
> Away3D and JigLibFlash Developer Team

Reply via email to