Page 1 of 4 123 ... LastLast
Results 1 to 20 of 70
  1. #1
    Member Atom's Avatar
    Join Date
    Jan 2006
    Location
    Ohio
    Posts
    11,459

    [Script] Meshfoot OBJ Sequence Manager (revised for Blender 2.66)

    Hi All,

    This my initial python port of the Meshfoot OBJ sequencer from Blender 2.49 to Blender 2.66. Meshfoot manages multiple OBJ sequences and allows you to think of the mesh sequence as if it were footage. OBJ sequences are generated by many programs such as Poser, Daz Studio, Maya, Blender, Lightwave, Grobotto and more. Meshfoot supports five out-of-range types. One Shot Hold, One Shot Die, Loop, Ping Pong and Random. This video shows how to link a folder with a series of OBJ files to a Blender scene. Meshfoot manages which frame gets displayed at what time depending upon the parameter settings for each list entry.

    Here is a video tutorial that explains how to use the script.
    Attached Images Attached Images
    Attached Files Attached Files
    Last edited by Atom; 21-Feb-13 at 13:59. Reason: Release of Blender 2.66 broke the script.
    OSX Mac Mini i7 @ 2.6ghz 16Gb Ram (no GPU)
    Windows 7 8Gb, GeForce GTX 660 2Gb Ram AMD Hexcore @ 2.7Ghz.
    Atom's Links Page



  2. #2
    Thanks for the script Atom, I followed your instructions, but this seems not to work on a mac…



  3. #3
    Member Atom's Avatar
    Join Date
    Jan 2006
    Location
    Ohio
    Posts
    11,459
    When I get a chance, I'll try it on my MacBook. I developed it on Windows XP64. So what part is not working?

    Can you see the panel after clicking the button?
    Are there script errors?
    Can you post a screen grab of what your OBJ sequence filenames look like?

    If the panels work, it might simply be a cross platform OS pathing problem.

    Thanks for the feedback.
    OSX Mac Mini i7 @ 2.6ghz 16Gb Ram (no GPU)
    Windows 7 8Gb, GeForce GTX 660 2Gb Ram AMD Hexcore @ 2.7Ghz.
    Atom's Links Page



  4. #4
    I can see the panel after clicking the button,
    my obj sequence is like this:
    Untitled 1_000000.obj
    Untitled 1_000001.obj


    Thanks for looking into this :-)
    Attached Images Attached Images



  5. #5
    Member
    Join Date
    Jun 2010
    Location
    Warsaw
    Posts
    822
    great! I have been missing this feature a lot in the last time!! Until we don't get fbx import that's really good stuff! I will tryit soon, thanks a lot!



  6. #6
    Member Atom's Avatar
    Join Date
    Jan 2006
    Location
    Ohio
    Posts
    11,459
    @Yodorow: I forgot to mention, that the zero padding code only supports 4 digits. So in your case, that is probably the failure. You could rename your sequence (if it is not that long) or re-export it with less zero padding. Another option would be to extend the function returnNameForNumber located on line #173 of the script to support longer zero padding.

    I would also like to mention that there is a test OBJ sequence of a running horse available for download on shareCG.com.
    http://www.sharecg.com/v/34388/view/...e-OBJ-sequence)

    There is a confirmed Mac pathing problem. I'm not sure why python does not handle this behind the scenes. For instance, I am using os.path.exists(myPath). On Windows this works if I give it something like this. os.path.exists("c:\myfoldername"). On OSX the same code fails even if I give it a valid Mac path like os.path.exists("SnowLeopard:Users:Atomownloads:horse_obj_sequence").

    Any tips on cross platform pathing solutions are welcome.
    Last edited by Atom; 24-Apr-12 at 10:54.
    OSX Mac Mini i7 @ 2.6ghz 16Gb Ram (no GPU)
    Windows 7 8Gb, GeForce GTX 660 2Gb Ram AMD Hexcore @ 2.7Ghz.
    Atom's Links Page



  7. #7
    I renamed my sequence so it has only four digits counting, now it works like a charm. Thank you very much for this wonderful script!



  8. #8
    Very good utility Atom!

    One question: Is there a handle/option to change up axis? I export the obj sequence from Maya which is Y-up and Blender is Z-up.

    Thanks



  9. #9
    Very good utility Atom!

    One question: Is there an option to change up axis?

    I export the OBJ sequence from Maya and we all know Maya and Blender have different orientations.

    Thanks.



  10. #10
    Member Atom's Avatar
    Join Date
    Jan 2006
    Location
    Ohio
    Posts
    11,459
    Just rotate the object once it appear in the scene. If you notice in my video I do the same thing with my Poser object. Keyboard commands RX90.
    OSX Mac Mini i7 @ 2.6ghz 16Gb Ram (no GPU)
    Windows 7 8Gb, GeForce GTX 660 2Gb Ram AMD Hexcore @ 2.7Ghz.
    Atom's Links Page



  11. #11
    I was able to find this while looking around, and I have to admit, this is a great tool, albeit rather hard to find.

    I did want to ask about how Meshfoot imports the .obj files. The basic functionality uses one object, but multiple meshes to cycle through, and I was wondering if there was (or could be) a way to separate each mesh into separate objects by the same name? Right now, this tool was able to take my skeletally-animated mesh that I'd exported move as it did before, so this has worked out very well; the tool is functional. My question is whether or not there could be a way to use Meshfoot's import structure to test the animation and then convert it in some way to separate objects once I've confirmed the functionality of the animation?

    Otherwise, excellent job getting this up-to-date to the latest version of Blender.



  12. #12
    Member Atom's Avatar
    Join Date
    Jan 2006
    Location
    Ohio
    Posts
    11,459
    Feel free to modify the script for your needs. The mesh import section is contained in an operator called OBJECT_OT_preload_mesh_sequence. It examines the properties of a list entry to decide what to do.

    All objects must have a unique name so there is no way in Blender to have two objects named the same.

    I have never actually tried writing an OBJ file to disk from Python so I do not have any code for that.

    The preload mesh button will load the mesh data in to Blender memory so after the button completes all the mesh frames are in memory. It sound like you just want a way to display them all simultaneously? If so just modify OBJECT_OT_preload_mesh_sequence to NOTdelete the object associated with the datablock.

    This is around line #770 in frame_meshfoot.py.
    Code:
    # Now that we have the mesh in memory and have named it, the object is no longer needed.
    ob_new_name = ob_new.name
    try:
        context.scene.objects.unlink(ob_new)    #This removes it from the scene, but not from memory.
    except:
        pass
    Change to:
    Code:
    # Now that we have the mesh in memory and have named it, the object is no longer needed.
    ob_new_name = ob_new.name
    try:
        pass    #context.scene.objects.unlink(ob_new)    #This removes it from the scene, but not from memory.
    except:
        pass
    So by adding pass we skip unlinking the object each mesh will now have an associated object that links it to the scene. You could also just remove the entire try/except block.
    Last edited by Atom; 10-Aug-12 at 19:04.
    OSX Mac Mini i7 @ 2.6ghz 16Gb Ram (no GPU)
    Windows 7 8Gb, GeForce GTX 660 2Gb Ram AMD Hexcore @ 2.7Ghz.
    Atom's Links Page



  13. #13
    Wow, thank you very much for that! That makes my life a whole lot easier than it was before. If I wanted to be at least a little bit helpful, I would suggest a checkbox of some sort that alternates between whether or not the objects should be kept in the scene or not, but I'm just nitpicking your script. Otherwise, it does what it has to do, although this has helped me tons. Thanks!

    EDIT: I also made an instructional post in my own thread for others who might have the same issue that I had. http://blenderartists.org/forum/show...=1#post2180732
    Last edited by Jet v4.3.5; 10-Aug-12 at 23:06.



  14. #14
    Member julperado's Avatar
    Join Date
    Feb 2011
    Location
    Medellin, Colombia
    Posts
    140
    Hi Atom! Is there any chance to get it working in 2.64? It doesn't work for me here
    My portfolio on Behance



  15. #15
    Member Atom's Avatar
    Join Date
    Jan 2006
    Location
    Ohio
    Posts
    11,459
    @julperado: Hmm....what part is not working for you? I just tried the above 2.62 version 1c along with the test horse obj sequence from sharecg and it worked fine. No crashes, no errors.

    I am using the official 2.64 Blender release.
    OSX Mac Mini i7 @ 2.6ghz 16Gb Ram (no GPU)
    Windows 7 8Gb, GeForce GTX 660 2Gb Ram AMD Hexcore @ 2.7Ghz.
    Atom's Links Page



  16. #16
    Member Atom's Avatar
    Join Date
    Jan 2006
    Location
    Ohio
    Posts
    11,459
    I guess I spoke too soon. Today's release of Blender 2.65, broke the script. I have posted a revised version in post #1 of this thread.
    OSX Mac Mini i7 @ 2.6ghz 16Gb Ram (no GPU)
    Windows 7 8Gb, GeForce GTX 660 2Gb Ram AMD Hexcore @ 2.7Ghz.
    Atom's Links Page



  17. #17
    So are there plans to allow it it bake or export obj sequences as well?



  18. #18
    Member Atom's Avatar
    Join Date
    Jan 2006
    Location
    Ohio
    Posts
    11,459
    No plans for that...can't Blender exporters already do that?
    OSX Mac Mini i7 @ 2.6ghz 16Gb Ram (no GPU)
    Windows 7 8Gb, GeForce GTX 660 2Gb Ram AMD Hexcore @ 2.7Ghz.
    Atom's Links Page



  19. #19
    Export a singular obj file, yes. A Sequence of obj files, no. It doesn't unfortunately, and there are not currently any plugins for this either that I can find.



  20. #20
    Member Atom's Avatar
    Join Date
    Jan 2006
    Location
    Ohio
    Posts
    11,459
    Have you tried checking the Animation checkbox for the existing OBJ exporter? I just tried it and it spit out a series of OBJ files.
    OSX Mac Mini i7 @ 2.6ghz 16Gb Ram (no GPU)
    Windows 7 8Gb, GeForce GTX 660 2Gb Ram AMD Hexcore @ 2.7Ghz.
    Atom's Links Page



Page 1 of 4 123 ... LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •