I had the same mirrored-MD2 problem when importing MD2 that was exported by
using MD2 Exporter in Blender. What I did to fix it was by editing MD2.as
file. Open your Md2.as file, you will find this code :

*                for (var h:int = 0; h < _vertices.length; h++)*
*                {*
*                    var position:Number3D = new Number3D();*
*                    position.x = -((sx * md2.readUnsignedByte()) + tx) *
scaling;*
*                    position.z = ((sy * md2.readUnsignedByte()) + ty) *
scaling;*
*                    position.y = ((sz * md2.readUnsignedByte()) + tz) *
scaling;*
*                    md2.readUnsignedByte(); // "vertex normal index"*
*                    frame.push(position);*
*                }*

And change "*position.z = ((sy * md2.readUnsignedByte()) + ty) * scaling;*"
to "*position.z = -((sy * md2.readUnsignedByte()) + ty) * scaling;*". You'll
notice that you only need to add "*-*". :D

About your performance issue of MD2, I never had any problem, maybe because
my MD2 models are low poly, between 50 to 200 triangles, 50 frames maximum.
This is how i play my MD2 animation :

var animData:AnimationData =
(maincharView.mesh.animationLibrary.getAnimation(animName) as
AnimationData);
animData.animator.fps = fps;
animData.animator.loop = loop;
animData.animator.gotoAndPlay(0);

-- 
Aji Pamungkas

On Mon, Nov 1, 2010 at 8:28 PM, Revalis <[email protected]> wrote:

> Oh. Other weird thing I forgot to mention is that when the model comes
> in, it is mirrored. And I don't recall my collada imports doing that;
> but I may have just been ignorant of it and only just now noticing. :P
>
> On Nov 1, 2:24 pm, Revalis <[email protected]> wrote:
> > Hey guys,
> >
> > I am moving over to using .md2 from .dae since the new animation
> > libraries seem to be a bit friendlier; however, I am getting some
> > weird performance issues. :/  Just wanted to make sure I'm not
> > overlooking a process for optimizing my movie.
> >
> > I am taking the exact same model/animation sequenceI I had previously
> > exported to .dae and have used QTip to export it, with animation, to
> > md2.   In regards to file size, it is much more compressed.. which I
> > like.
> >
> > Codewise, the only thing different I did was call 'new Md2' instead of
> > 'new Collada' (And every reference of Collada to Md2). Still using the
> > LoaderCube and still importing my material with a Loader (then Cast to
> > BitmapMaterial).
> >
> > When I play the animations in Away/Flash, they appear to move
> > incredibly sluggishly. Almost 2-3 times as slow.
> >
> > Is this to be expected? Or is the Md2 a less forgiving format to
> > polycounts than Collada? This model sits at 1823 polys and 70 frames
> > of animation.
> >
> > The walk cycle is frames 2 - 27 and Stats is showing me an average of
> > 10-12  out of  31 FPS.
> >
> > Now, if I watch the same .swf in IE, I will see an average of 19-20
> > FPS.
> >
> > Regardless of that speed, though, the animation itself is, visually,
> > slower than it is animated in Max.
> >
> > Hopefully this makes sense.. otherwise I might have to do some
> > recordings to prove I'm not insane! :P
>

Reply via email to