automatic PNG export

A forum dedicated to George scripting questions
elguappo
Posts: 8
Joined: 15 Nov 2011, 23:10

automatic PNG export

Post by elguappo »

Hi there,

I'm looking for some assistance on being able to run a command that exports PNG's out of TVpaint. The process we have for other software is to deliver the file to our server and we export sequences for that software to be then trans-coded for viewing on our application...the assistance i am looking for is how in George can I export PNG's automatically?

Thnxs for any suggestions,

M
User avatar
Fabrice
Posts: 10077
Joined: 17 Jul 2007, 15:00
Contact:

Re: automatic PNG export

Post by Fabrice »

answer in progress :)
Image
...
Success
Fabrice Debarge
User avatar
Mike
Posts: 1050
Joined: 16 Feb 2006, 08:58

Re: automatic PNG export

Post by Mike »

You can use this commands as an embedded george script in a custom panel:

//------------------------------------------------------------------------------------
tv_SaveMode "PNG"
tv_AlphaSaveMode "NoPreMultiply"
tv_Background "NONE"
bg = result

tv_SaveSequence "C:/Users/XXX/Desktop/dir/file.png"

tv_Background bg
//------------------------------------------------------------------------------------

To choose the path, you can do several embedded george scripts which contain their own path, or use the command tv_ReqFile to open the browser to select the file to save
TVPaint Team
elguappo
Posts: 8
Joined: 15 Nov 2011, 23:10

Re: automatic PNG export

Post by elguappo »

Hi Mike,

Thanks for the reply. So i see this solution is similar to Maya. Within Maya, users can press our custom toolset to define their render and the render information is passed to our server and all render is done via the farm. For Flash, we provide the fla and JSFL to the farm and it then renders out the PNG's. All this is done without any user from the server side. BUT we need to provide the info to the FARM. So, based on your script do you think i could collect that info and pass the render info and TVPP file to the farm and have it render headlessly without user intervention?

Thnxs Mike,

Mark
User avatar
Mike
Posts: 1050
Joined: 16 Feb 2006, 08:58

Re: automatic PNG export

Post by Mike »

Mmmhh, if I understand what you want to do, it seems it's not possible :|
I'll try to see if there is another way to do it, but I don't think so.
TVPaint Team
elguappo
Posts: 8
Joined: 15 Nov 2011, 23:10

Re: automatic PNG export

Post by elguappo »

Hi Mike,

I suppose in lieu of the process i outlined above, i can create a button within TVP that exports a PNG for image review and a mp4 for animation review into preset local folders...then my app upon check in can bring the assets online. crappy thing is the inability to remove render from the local user and pass the render to a farm.

As that is the ultimate goal. To enable TVP users to not have to waste time rendering and pass that to a farm..

Let me know if you can think of any other options.

Thanks for your assistance Mike,

Mark
User avatar
Fabrice
Posts: 10077
Joined: 17 Jul 2007, 15:00
Contact:

Re: automatic PNG export

Post by Fabrice »

crappy thing is the inability to remove render from the local user and pass the render to a farm.
I guess it's because we are not properly doing any render in TVPaint. We are just speaking about an export.
Or am I wrong Mike ?
Fabrice Debarge
User avatar
idragosani
Posts: 987
Joined: 06 May 2008, 00:39
Location: Germantown MD
Contact:

Re: automatic PNG export

Post by idragosani »

I've been wondering about similar functionality, to be able to generate frame sequences "offline" rather than manually inside the application. Can TVPaint run a george script from the command-line? A nifty feature would be, as an export option, to generate a script that could be run as a command-line option to TVPaint that could generate the frame sequence or video or whatever (like the --batch option that GIMP has). This would work well if you had a sequence of scenes you needed to generate separately. The video editor I use (kdenlive) has an option like this, so instead of directly rendering a project to video inside the GUI, it creates a script that can be run from the command-line as a non-GUI job. I don't have a server farm, but being able to run batch jobs headlessly with TVPaint would be a handy feature to have.
Brett W. McCoy -- http://www.brettwmccoy.com
TVP Pro 10 : Intel i7 2600 3.4 GHz : 8GB RAM : Ubuntu Studio 14.04 : Cintiq 21UX
User avatar
Mike
Posts: 1050
Joined: 16 Feb 2006, 08:58

Re: automatic PNG export

Post by Mike »

Maybe, here, there are some tips you can use.

You can run TVPaint Animation from command line using this syntaxe:

"C:\Program Files\TVPaint Developpement\TVPaint Animation 10 Pro (64bits)\TVPaint Animation 10 Pro (64bits).exe" "path/to/the/tvpp/to/open/file.tvpp" "cmd=[tv_SaveMode PNG][tv_AlphaSaveMode NoPreMultiply][tv_Background NONE][tv_SaveSequence C:/Users/XXX/Desktop/dir/file.png]"
or
"C:\Program Files\TVPaint Developpement\TVPaint Animation 10 Pro (64bits)\TVPaint Animation 10 Pro (64bits).exe" "path/to/the/tvpp/to/open/file.tvpp" "cmd=tv_SaveMode PNG" "cmd=tv_AlphaSaveMode NoPreMultiply" "cmd=tv_Background NONE" "cmd=tv_SaveSequence C:/Users/XXX/Desktop/dir/file.png"
or
"C:\Program Files\TVPaint Developpement\TVPaint Animation 10 Pro (64bits)\TVPaint Animation 10 Pro (64bits).exe" "path/to/the/tvpp/to/open/file.tvpp" "script=myscript.grg"

The first argument is the file to open.
The "cmd" parameter is all the george commands (and only commands are allowed, can't have variable) to apply.
(If you use the tv_SaveSequence in a cmd, the file can't have space)
The "script" parameter call the george script.
(You can create the script file by using 'echo' command and redirection in a temp file, before calling TVPaint Animation.exe with this temp file, to be able to modify file name on the command line)

If TVPaint is already running, the action will be stored to be processed later.

BUT the most important thing is that TVPaint Animation CAN AND MUST OPEN ITS INTERFACE when it starts.
TVPaint Team
elguappo
Posts: 8
Joined: 15 Nov 2011, 23:10

Re: automatic PNG export

Post by elguappo »

Hi Mike,

I will take a look, but ya we get the difference between CG type "render" and export. The idea is to remove the need to export from the end user. Enable that to be a farm responsibility via Qube or similar manager...

I'll take a run at your suggestions and try to add them as jobs within Qube and see how it goes...

Thanks again for all your assistance...

Mark
User avatar
idragosani
Posts: 987
Joined: 06 May 2008, 00:39
Location: Germantown MD
Contact:

Re: automatic PNG export

Post by idragosani »

I am getting dynamic link errors when trying this on Linux:

$ /usr/share/tvpaint-developpement/tvp-animation-10-pro/tvp-animation-10-pro ~/Projects/animations/Tales\ from\ the\ Perilous\ Quill/Episode_1/the_birthday_party.tvpp cmd="tv_SaveMode PNG" cmd="tv_AlphaSaveMode NoPreMultiply" cmd="tv_Background NONE" cmd="tv_SaveSequence ./file.png"

nOS::GetProcAddress() : Cannot load symbols: /usr/share/tvpaint-developpement/tvp-animation-10-pro/plugins/saver/FFmpeg.so: undefined symbol: CreateSaverFormatnOS::GetProcAddress() : Cannot load symbols: /usr/share/tvpaint-developpement/tvp-animation-10-pro/plugins/saver/FFmpeg.so: undefined symbol: CreateSaverFormat2

Same happens if I use a script on the command-line instead.

Exporting works fine if I do it through the GUI.
Brett W. McCoy -- http://www.brettwmccoy.com
TVP Pro 10 : Intel i7 2600 3.4 GHz : 8GB RAM : Ubuntu Studio 14.04 : Cintiq 21UX
User avatar
Mike
Posts: 1050
Joined: 16 Feb 2006, 08:58

Re: automatic PNG export

Post by Mike »

You get a log error but the commands work, no ? because it's not really an error in that case :)

And by the way, in that case, you must use an absolute path instead of your "./file" for the command.
TVPaint Team
User avatar
idragosani
Posts: 987
Joined: 06 May 2008, 00:39
Location: Germantown MD
Contact:

Re: automatic PNG export

Post by idragosani »

No they don't work, I don't get any exported files. I fixed the path for the exported filename also.
Brett W. McCoy -- http://www.brettwmccoy.com
TVP Pro 10 : Intel i7 2600 3.4 GHz : 8GB RAM : Ubuntu Studio 14.04 : Cintiq 21UX
User avatar
Mike
Posts: 1050
Joined: 16 Feb 2006, 08:58

Re: automatic PNG export

Post by Mike »

What happens exactly ?
TVPaint opens ? starts loading project file ? starts one command ?
TVPaint Team
User avatar
idragosani
Posts: 987
Joined: 06 May 2008, 00:39
Location: Germantown MD
Contact:

Re: automatic PNG export

Post by idragosani »

Yes the file load but nothing happens (and I see the error in the terminal window).
Brett W. McCoy -- http://www.brettwmccoy.com
TVP Pro 10 : Intel i7 2600 3.4 GHz : 8GB RAM : Ubuntu Studio 14.04 : Cintiq 21UX
Post Reply