If you have the ability to export your scene as a collada file then just the
transforms on the mesh will be included. If file size is an issue, you can
embed the XML of the collada file into a .swf and that will convert it to
byte code. then just load the swf to get the XML. doing this i got a 10 fold
decrease in file size.



On Wed, Jun 17, 2009 at 7:42 PM, renkster <[email protected]> wrote:

>
> Just another question. i decide to throw all my questions inside this
> thread, so maybe this might be helpful for somebody other starting
> with away3d and md2.
>
> So - ive got a character which should perform several animations
> triggered at runtime.
>
> Some questions:
>
> - is it the proper way to export every animation-sequence as a single
> md2 which also contains the whole geometry-information? Or will
> vertice-duplicates in the geometry be ignored from the engine?
>
> - is there some manager to handle the different sequences. i fooled
> around with the animator (http://www.closier.nl/blog/?cat=6), tried to
> register the sequences.
> But if i get the point the animator is there to manage still md2 to
> simulate a animated md2, right?
>
> - Since my whole framework environment runs with 30 fps - the md2-ani
> should run also with 30 fps, or ist it possible to export them with a
> lower framerate? ( aka lower filesize?)
>
> - the model has a total polycount of around 1000. Each md2 has a size
> of 96kB > exported to AS3 -> 400kB. Do i some mistake?
>
>
>
> thanks again before :-),
> olee
>
>
>
> On 17 Jun., 16:24, renkster <[email protected]> wrote:
> > okay, i found the problem.
> >
> > md2.play(new AnimationSequence("run", true, true, 10));
> >  i didnt recognized the sequence in the md2 has to be named and called
> > by this name via AnimationSequence.
> >
> > But no worries - I dont think this will be my last question ;-)
> >
> > Thanks
> >
> > On 17 Jun., 15:15, renkster <[email protected]> wrote:
> >
> > > Hey Fabrice,
> >
> > > thanks for your answer. Would you be so kind to spend me again a bit
> > > of your time?
> >
> > > My model is loaded correct, also the texture(with some uv-problems,
> > > but this may be done later)
> > > But no animation is played.
> >
> > > A short schematic- rundown of what iam trying: Something wrong
> > > implemented?
> >
> > > Olee
> >
> > > package firstContact
> > > {
> > >         public class FirstConatctAway3D extends Sprite
> > >         {
> > >                 public var view : View3D;
> > >                 public var sphere : Sphere;
> >
> > >                 [Embed(source="../../assets/firstContact/
> > > test_6.md2",mimeType="application/octet-stream")]
> > >                 public static const BMD2 : Class;
> >
> > >
> [Embed(source="../../assets/firstContact/texture_low.jpg")]
> > >                 public static var Texture : Class;
> >
> > >                 public function FirstConatctAway3D()
> > >                 {
> > >                         initObjects();
> > >                         addEventListener(Event.ENTER_FRAME,
> onEnterFrame);
> > >                 }
> >
> > >                 private function initObjects() : void
> > >                 {
> >
> > >                         md2 = Md2.parse(BMD2, {ownCanvas:true,
> name:"torso",
> > > material:material, back:material});
> > >                         md2.movePivot((md2.minX + md2.maxX) / 2,
> (md2.minY + md2.maxY) / 2,
> > > (md2.minZ + md2.maxZ) / 2);
> > >                         md2.x = md2.z = 0;
> > >                         md2.scale(1);
> > >                         md2.y = 2000;
> > >                         md2.play(new AnimationSequence("run", true,
> true, 10));
> > >                         view.scene.addChild(md2);
> > >                 }
> >
> > >                 private function onEnterFrame(event : Event) : void
> > >                 {
> > >                         md2.rotationY += 1;
> > >                         view.scene.updateTime();
> > >                         view.render();
> > >                 }
> > >         }
> >
> > > }
> >
> > > On 17 Jun., 13:09, Fabrice3D <[email protected]> wrote:
> >
> > > > Hi Olee,
> > > > Welcome to Away!
> >
> > > > for your md2, if you do not will make the same md2 url dynamic
> > > > you indeed can export to as3.
> > > > Use the Mesh method (the animation export is not yet implemnted in
> the
> > > > as3Exporter class)
> > > > like this
> >
> > > > myloadedmd2.asAS3Class("Coolname", "coolpackagename", true, true);
> >
> > > > save the clipboard in textapp as Coolname.as
> > > > then add to your code, import coolpackagename.Coolname;
> >
> > > > var myanim:Coolname = new Coolname();
> > > > view.scene.addChild(myAnim);
> >
> > > > from now on, "driving the animation is the same for AS3 or md2, same
>
> > > > rule for Animator native class.
> > > > myAnim.play(new AnimationSequence("run", true, true, 10));
> >
> > > > in your enterframe, add the line
> >
> > > > view.scene.updateTime();
> >
> > > > you have a whole collection of methods, event that can be used,
> set...
> > > > this should help you get started. --> read the online doc
> >
> > > > Fabrice
> >
> > > > On Jun 17, 2009, at 12:59 PM, [email protected] wrote:
> >
> > > > > Hi Group,
> >
> > > > > first of all - this is my first project using the away3d library
> and
> > > > > iam pretty anticipated to work with it. but unfortunately the
> > > > > timescale for the project is quite tight so maybe i have to ask
> some
> > > > > silly questions instead of enjoing the learning process :-)
> >
> > > > > First thing: i have to animate a character, which is exported from
> max
> > > > > as md2 with different animated sequences. the sequences has to be
> > > > > imported, played and blended over.
> >
> > > > > So far i think the best way is to convert the md2 as as3 - but from
> > > > > this point iam confused how do i have to use the animation-engine
> from
> > > > > away.
> > > > > Is it just a : instance_of_seq_01.play(),
> > > > > or do i have to use the AnimationSequence ? (instance.play(new
> > > > > AnimationSequence("run", true, true, 30)))
> >
> > > > > Is there somewhere a quick rundown which is the best way to do this
> i
> > > > > havent seen yet?
> > > > > Or is somebody willing to push me in the right direction?
> >
> > > > > Thanks in advance,
> > > > > Olee
>

Reply via email to