Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    Export a range of frames in OBJ format

    Plugin Requests
    0
    3
    788
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H
      Helper
      last edited by

      THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

      On 19/11/2005 at 01:41, xxxxxxxx wrote:

      Looking for the ability to export a range of frames as individual OBJ files. Need to be able to import animated/deformed geometry into Houdini. Since Houdini seems to be very limited with it's capabilites of importing various formats it appears that OBJ's work the best. I'm able to use the RipTide plugin to get the type of control I need over the OBJ file format, however I'm only able to write out a single frame at a time. I'd like to be able to specify a range of frames and have the plugin/script step through the sequence and export numbered OBJ files. I did look at CrowdImporter and according to the author it's not capable of doing this. I'm fairly new at C4D so I'm not sure what the best process would be for acomplishing this. Although funds are limited I can offer some payment for this development. If anyone is interested or has suggestions please post.

      1 Reply Last reply Reply Quote 0
      • H
        Helper
        last edited by

        THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

        On 22/11/2005 at 17:54, xxxxxxxx wrote:

        Hi. I´m not  a proffessional programmer, but I think what you want is quiiet easy with a coffee script. Explain me better what you want and i will try to do so. I don´t know what is Houndini, is it a cute 3d program? how does it imports obj?

        1 Reply Last reply Reply Quote 0
        • H
          Helper
          last edited by

          THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

          On 07/02/2006 at 04:18, xxxxxxxx wrote:

          Hello Coconut,
          missak is right, it is quite easy. Here is a short example that moves through a documents animations frames. All you will have to add is a routine that grabs the clone of your object to export (obj->GetClone(0);) and converts its current status to a new Polygon-object by SendModelingCommand (I did not try this out so far myself, that's why I did not give you code here that was not tested).
          Here is a loop to iterate the active documents animationframes:
          exportframes
          {
          var doc=GetActiveDocument();
          var obj=GetActiveObject(doc);//assume your obj was selected
          var Tm=new(BaseTime)
          var MaxTime=doc->GetMaxTime();
          var Fps=doc->GetFps();
          var MaxFrame=MaxTime->GetFrame(Fps);
          var i=0;
          for (i=0;i<MaxFrame+1;i++) {
            Tm->SetFrame(i,Fps);
            doc->SetTime(Tm);
            doc->AnimateDocument(ANIMATE_NO_PARTICLES);// Maybe AnimateObject will work too.
            var nobj=obj->GetClone(0);
          //.... put your code to create the exportobject from nobj here. I further assume the resulting object will be referenced by the variable "Exportobj"
            var ndoc=new(BaseDocument);// You only want your object in the saved file
            ndoc->Insertobject(Exportobj,NULL,NULL);// insert frameobject in new scene
            ndoc->Message(DOCUMENT_CHANGED);
            ndoc->save("...YOURFILE_PATH_AND_NAME_"+tostring(i)+".obj"); // save to obj-file
            KillDocument(ndoc); // Remove new document after saving
           }
          }
          I am not quite sure about everything here (just coded it from my memory) but I think the principles are shown how to do it.
          May the force be with you ;),
          COFFEJUNKIE

          1 Reply Last reply Reply Quote 0
          • First post
            Last post