[Closed] Save out half-sized version after render?
I’m thinking about making a script which after rendering a frame saves out a half (or quarter) sized version for speeding up comp work.
I can easily write this if I’m doing a Render() command script, but I want this to work as a post-render script with network rendering.
So my main question is, how do I get the name of the last rendered file when it’s a network render?
why not to set half/quater bitmap size initially? What is the reason to render more and save just a part?
The idea is so we have the full resolution version for final compositing and then save out a small jpeg version that we can use for putting a low-res comp together quickly, comping in HD is always a pain!
Your comp app should have proxy tools for just this purpose. You could probably embed a persistent #postrenderframe callback and test the current time. From the Maxscript Help:
General Event Callback Mechanism[left]#postRenderFrame: Array
[/left]
[left]Sent just after each frame is rendered by the renderer. The current frame being rendered is set into the MAXScript currentTime context and system global, so any references to other scene object properties will automatically be resolved at the currently rendering frame’s time. This notification is not sent out when the renderer is called to update the Material Editor sample spheres, only during output rendering.
Haven’t tried it myself, but it may work.
-Eric
[/left]
I’ve understood. You want to have some sort of thumbnails (or previews).
If render renders high rez bitmaps in files technically you can use File watcher and another process to listen appearance of a new file in some directory and make smaller versions of high rez bitmaps on fly.
Another way is to use result of render (render always returns result bitmap) with combination of #postRenderFrame callback.
Hi Dave,
Can’t you read the filename used in the render setup dialog and add the current frame number to get the last rendered image?
Another way to do this is to get the files in the directory you’re currently rendering and it should be the last file in the array.
But I bet there’s some maxscript thingie to get the last rendered filename.
Cheers!
Hi,
I have one that is a rendereffect. nothing to fancy! A bit old but should work OK!
--------------------------------------------------------------------------------
-- Render effect, resize image
-- version 1.0
-- max version 6, 7, 8, 9, 2008... (probably earlier as well)
-- written by Joshua Newman
-- www.joshuanewman.net
-- last updated 17/06/07
-- copyright 2005
--------------------------------------------------------------------------------
plugin RenderEffect resizerender name:"Resize Rendering" classID:#(0x7b311794, 0x22b09737) version:1
(
parameters main rollout:params
(
size type:#float animatable:false ui:size default:50
)
rollout params "Parameters"
(
spinner size "Percent of original rendering:" range:[1,100,50]
label l1 "\xa9 2007 Joshua Newman" offset:[-8,0] across:2
hyperlink hl "www.joshuanewman.net" address:"www.joshuanewman.net" offset:[4,0]
)
on apply bm progressCB: do
(
-- progressCB.settitle "Resizing Render : www.joshuanewman.net"
tb=bitmap (bm.width*(size/100.0)) (bm.height*(size/100.0)) filename:((getFilenamePath rendOutputFilename)+(getFilenameFile rendOutputFilename)+"_low"+(getFilenameType rendOutputFilename))
copy bm tb
display tb
if rendOutputFilename!="" then save tb
)
)
Josh.