Feb 2012
1 / 3
Feb 2012
Feb 2012

Hi. I’m working with Augmented Reality (AR) and am reading the Prototyping Augmented Reality book from Sybex. The book only relates its 3D modelling tutorials to Blender. I’ve been trying to figure out translations of functions from Blender into Maya, but I’m particularly stumped on this one.

It tells me in Blender that in order to animate in AR, I need to export my 3D character animation as a sequence of .objs using the Wavefront .obj feature. Now I have my .obj plugin running in Maya, but I can’t seem to get it to export an animation in sequence or find any good variable settings for the obj export. The online Maya guide from Autodesk seems to suggest that it’s there but hell if I know where since it doesn’t exactly tell you how to use it.

Seeing as I’m preparing to use this for a 24-hour competition in a few weeks, saving .objs manually on every frame and hoping everything works is very inefficient.

How do I export a sequence of .objs for an animation like Blender’s Wavefront option? Is there some sort of equivalent in Maya? Do I need a plugin?

  • created

    Feb '12
  • last reply

    Feb '12
  • 2

    replies

  • 2.1k

    views

  • 1

    user

No in Maya the Obj-Export options doesnt include per frame export. Wy dont u use a script and iterate through the frame range and export your models each frame?

Select your meshes in maya, open the ScriptEditor paste in this lines and edit the variables, then execute:

{
    int $startFrame = 0;
    int $endFrame = 10;
    string $outPath = "d:/objExport/";

    string $sel[] = ls -long -sl;
    string $selShort[] = ls -sl;

    for($i=$startFrame;$i<=$endFrame;$i++)
    {
        currentTime $i;
        select -cl;
        select $sel;
        string $currentName = "obj_frame_" + $i + ".obj";
        file -f -op "groups=1;ptgroups=0;materials=0;smoothing=0;normals=0" -typ "OBJexport" -pr -es ($outPath + $currentName);
    };
};

Suggested Topics

Want to read more? Browse other topics in Maya or view latest topics.