OBJ sequences



  • Is there a simple way to import an obj sequence into poser? I can only see how to import one particular frame of the sequence. (For reference, the obj sequence was made in blender and so I now have 50 files of the various frames)



  • This may not be as easy as it first appears. There are two ways to go about it that I can think of. I've done both manually, but ideally they would be automated by a Python script.

    My preferred method is to import one mesh, then apply subsequent frames as morph targets. Each frame should then have its specific morph set to 1.000, and all others to zero. The advantage is that you only have to apply materials to one mesh.

    However this falls down if your meshes have different vertex counts, and if you're talking about Blender fluid simulations, I believe this is the case. For this situation, you need to import each mesh, and apply materials to it. One advantage may be that you can have different materials on each frame. Then translate each mesh so that it's well away from your scene (for example, yTran -1000), except on the frame where it's supposed to be visible.

    Either of these methods would obviously be tedious for 50 frames. I don't know of a script that does this, but I'd be happy to know about one if it exists.



  • Hi. In Poser Pro 11 you can just drag and drop the obj files onto the preview window, the import dialogue box will display for each obj but it's pretty quick once you've set the import options for the first item


  • Poser Ambassadors

    @adi said in OBJ sequences:

    Hi. In Poser Pro 11 you can just drag and drop the obj files onto the preview window, the import dialogue box will display for each obj but it's pretty quick once you've set the import options for the first item

    He's not asking how to import 50 objs quickly. He's asking how to make an animation sequence so that for each frame only one of those objs is visible at a time and only for one frame, and they're correctly established in order.



  • I would suggest if its a morph target then load your first object and set it's materials etc. Have a script that allows you to select the x number of objects

      def create_animation(Target, ListOfFiles) 
      select frame(1)
      render()
      saveoutput()
      for file in list
              select frame(frame+1)
              loadmorph(target, file, name)
              set_morph(name,1)
              render()
              saveoutput()
              removemorph(target, name)
    

    or if it different vert counts and so can't be done as morph

      def create_animation(Target, ListOfFiles) 
      select frame(1)
      render()
      saveoutput()
      for each file in list
              old=target
              select frame(frame+1)
              target=loadobj(file)
              copy_mats(old,target)
              delete (old)
              render()
              saveoutput()
    

    neither would be too difficult to flesh out (and probably call EZAnimation ;o)

    Amanda



  • It would be great import an obj sequence in a folder and poser automatically, in the scene, render one obj in each frame of that folder. I think many times, even you don't need the model in the scene, only change it when you render the animation.



  • @englishbob said in OBJ sequences:

    Then translate each mesh so that it's well away from your scene (for example, yTran -1000), except on the frame where it's supposed to be visible.

    Don't translate. Change its visibility. Translating dozens of meshes to the same location a far away from the origin is almost a guarantee for terribly slow ray tracing.



  • @amethystpendant said in OBJ sequences:

    probably call EZAnimation ;o

    My suggestion is EZSequence :-)

    @adh3d said in OBJ sequences:

    I think many times, even you don't need the model in the scene, only change it when you render the animation.

    This was the approach in @amethystpendant's pseudo-code; but I'd prefer to have the objects visible at the appropriate frame. I can't imagine trying to set up a scene when I can't see everything!

    @stefan said in OBJ sequences:

    Don't translate. Change its visibility.

    :facepalm: Thanks! I hadn't registered that it's now possible to animate visibility. My translate technique dates back to Poser 7. I mainly use it to 'post-work' exported dynamic cloth meshes in a modeller. It's never been an obvious cause of render slowness, but I accept your point.



  • @englishbob The reason I went for that approach was to avoid having lots of large objects in a scene or one object with lots of large morph delta's loaded.



  • @amethystpendant : I can understand that, both of the approaches I outlined can boost the scene memory considerably. Which raises a question: if you delete a mesh, or a morph, is the memory recovered? I'll see if I can test this.



  • @englishbob good point!



  • I just tried it, and the tl;dr answer is "yes".

    Importing a mesh actually seems to use a lot more memory than adding a morph target, which is fair if you assume that morph deltas are stored as x, y, z floating point values.

    It's hard to measure because of this, but I got the impression than memory was recovered after a morph had been deleted.

    After I'd deleted the mesh itself, Poser still used a little more memory than it had after it was freshly loaded. Not even File > New released it all. However it's still worth deleting a mesh that's no longer needed, if that's the method you need to use.

    I'd still prefer to have everything available, but I won't be importing 50 meshes, and I have buckets of RAM, so each to their own. :)