Fri, Dec 13, 7:29 AM CST

Renderosity Forums / Poser - OFFICIAL



Welcome to the Poser - OFFICIAL Forum

Forum Coordinators: RedPhantom

Poser - OFFICIAL F.A.Q (Last Updated: 2024 Dec 12 6:08 pm)



Subject: Render by specific frames?


TheOwl ( ) posted Tue, 22 November 2011 at 7:04 PM · edited Thu, 12 December 2024 at 11:59 AM

Lets say I created a 30 frame animation and I want to render only frames number 2, 10, and 18. And I want to leave my computer to render these specific frames for me while I am away.

 

I understand I can simply save different pz3 files for each frame but saving some hard disk space will be good.

So far, I think Poser doesnt offer this kind of rendering, pretty much renders only where the main camera is currently located in the timeline.

Are there other methods or a python script out there that can do this?

Passion is anger and love combined. So if it looks angry, give it some love!


willyb53 ( ) posted Tue, 22 November 2011 at 7:21 PM

Of course if you have Pro2012 you can send the frams to the queue.

when you have it set up you can just walk away

 

Bill

People that know everything by definition can not learn anything


TheOwl ( ) posted Tue, 22 November 2011 at 7:29 PM · edited Tue, 22 November 2011 at 7:30 PM

I understand that but I will need to save alot of scene files that will use alot of disk space.

Looks like I will have to enable file compression to save space.

And I dont have the pro 2012

Passion is anger and love combined. So if it looks angry, give it some love!


willyb53 ( ) posted Tue, 22 November 2011 at 7:40 PM

Sorry, I know of no way to do it without Pro, mayby someone else will be able to help

Bill

People that know everything by definition can not learn anything


markschum ( ) posted Tue, 22 November 2011 at 10:44 PM

There were a few render scripts , have a look in freestuff. If you need this often and cant find one I have one I can change for you.

 


markschum ( ) posted Tue, 22 November 2011 at 11:14 PM

file_475519.txt

try this , I cant test it myself at the moment.

You need to edit the script for the file location to save the renders and the frame numbers to render.

It will use firefly to render with whatever settings you have.

saves file as render_xx where xx is the frame number .

definately save a pz3 before you run this in case bad things happen.

 

 


TheOwl ( ) posted Tue, 22 November 2011 at 11:45 PM

Wow This looks useful markschum!

 

ummmm....

 

a little tutorial anybody? I am not well versed in python....

Passion is anger and love combined. So if it looks angry, give it some love!


markschum ( ) posted Wed, 23 November 2011 at 1:10 AM · edited Wed, 23 November 2011 at 1:17 AM

import poser
import os

frameslst  = [0,5,10] <<<<<<<<<<<<<<<<<<<the frames to render

process each file in the list

for cf in frameslst:
    # create output name
    cfp ="c:/documents and settings/owner/my documents/my renders/" <<< path to save files in
    cfo =  cfp + "render_" + str(cf) + ".png"
    # get the scene and set render type - use current render options
    scn = poser.Scene()
    scn.SetCurrentRenderEngine(poser.kRenderEngineCodeFIREFLY)
    scn.SetFrame(cf)
    # render the scene
    prr = scn.Render()
    print prr
    # save the image , same path, as png
    print "Saving image as: " + cfo
    scn.SaveImage("png", myfilepath  + cfo ) <<<<< remove myfilepath + from this line

print "done!"

 

rename the txt file to a py file and save anywhere in the runtime/python/poserscripts folder

just edit the two lines shown using wordpad or other text editor

  • remove the myfilepath + from the line shown , its a mistake , sorry

run from the file > run python script menu

an error in rendering will stop the script  so without a render queue its a bit of run it and hope for the best.

 


TheOwl ( ) posted Wed, 23 November 2011 at 12:25 PM

Quote - 0
Saving image as: C:UsersTheOwlDocuments
enderFramesrender_0.png
Traceback (most recent call last):
File "C:Program Files (x86)Smith MicroPoser ProRuntimePythonposerScriptsScriptsMenuRender Markschumrender_frames_list.py", line 32, in ?
scn.SaveImage("png", cfo )
poser.error: A file error occurred.

 

It didn't work. Something's up on the scn.SaveImage line.

Passion is anger and love combined. So if it looks angry, give it some love!


markschum ( ) posted Wed, 23 November 2011 at 1:16 PM

ok, I will try to test it this afternoon.


markschum ( ) posted Wed, 23 November 2011 at 1:31 PM

the destination path must exist , thats the cfp variable  and it must end in a /

 check where it writes to the screen "saving file xxxxxxxxxxxxxx"  The filename should be a fully specified path to an existing folder and the filename should be render_xx.png

 

 

 


TheOwl ( ) posted Wed, 23 November 2011 at 6:29 PM

I got it!

What I did is I changed all the "" to "/" in the cfp variable and added another "/" in the end.

At first it didn't work because the file I was using is a pzz scene file. So I disabled compression and saved it to pz3 then rerendered.

It worked like a charm!

 

Thanks so much Markschum! And Happy Thanksgiving!

Passion is anger and love combined. So if it looks angry, give it some love!


markschum ( ) posted Wed, 23 November 2011 at 11:03 PM

excellent.

like many of my scripts it was never intended for general use , and is rathe rough as programming goes. Glad to see it useful to someone ;-)

 

happy thanksgiving and christmas / new years .


Privacy Notice

This site uses cookies to deliver the best experience. Our own cookies make user accounts and other features possible. Third-party cookies are used to display relevant ads and to analyze how Renderosity is used. By using our site, you acknowledge that you have read and understood our Terms of Service, including our Cookie Policy and our Privacy Policy.