ashishdantu
02-17-2006, 04:16 AM
hi everybody,
i am working on this small script which ....
1) enables me to render all my 9 cameras per frame and places the rendered images in the respective folders:
global myCams=#("Camera01","Camera02","Camera03","Camera04","Camera05","Camera06","Camera07","Camera08","Camera09");
global renCam;
-- animationrange.end
for t = animationrange.start to 9 do
(
sliderTime=t;
print (t as string +"Frame\n");
for c = 1 to myCams.count do
(
makeDir ("D:\\TestRenders\\"+(myCams[c]) as string);
print ("camera "+c as string);
renCam=getnodebyname (myCams[c]) exact:true
render camera:renCam frame:t vfb:false outputheight:250 outputwidth:250 outputfile:("d:\\TestRenders\\"+(myCams[c]) as string+"\\"+t as string+c as string+".jpg")
)
)
2) now i've also the need that i need to combine (stitch) all these images - 9 images into one image at the end and delete those 9 images. i'll need to automate it as i might end up with thousands of renders.
but i was wondering how i can merge these two steps into one : say i render each camera's image into a single image (region render ?) and i keep filling the whole image , which is like 100 in height and (250 * 9 cameras) in width ? this will merge the above 2 steps into one right ?
i have some thing like : (i'm missing and pls correct me ..)
global myCams=#("Camera01","Camera02","Camera03","Camera04","Camera05","Camera06","Camera07","Camera08","Camera09");
global renCam;
-- animationrange.end
for t = animationrange.start to 9 do
(
sliderTime=t;
print (t as string +"Frame\n");
for c = 1 to myCams.count do
(
makeDir ("D:\\TestRenders\\"+(myCams[c]) as string);
print ("camera "+c as string);
renCam=getnodebyname (myCams[c]) exact:true
rw=900 -- the overall width of the rendered image
rh=200 -- the height of the cropped row (ie 50 pixels high)
leftP=0
rightP=(leftP * c)
fname="d://TestRenders//bow.jpg" -- the filename of the output
------------------------------------------------------------
render camera:renCam frame:t rendertype:#region region:[(leftP*c),(leftP*c),(rightP+100),(rh)] outputfile:fname
-- render camera:renCam frame:t vfb:false outputheight:250 outputwidth:250 rendertype:#normal region:[0,0,20,20] outputfile:("d:\\TestRenders\\"+(myCams[c]) as string+"\\"+t as string+c as string+".jpg")
)
)
but i get -- Runtime error: Region rendering only available on active view >> then how do i use the renderType:region option ? and what does it mean by ' active view '?
can anybody guide me how to go about it ? how do i fill a image in blocks, each black -a render of each of my camera ?
rgds,
i am working on this small script which ....
1) enables me to render all my 9 cameras per frame and places the rendered images in the respective folders:
global myCams=#("Camera01","Camera02","Camera03","Camera04","Camera05","Camera06","Camera07","Camera08","Camera09");
global renCam;
-- animationrange.end
for t = animationrange.start to 9 do
(
sliderTime=t;
print (t as string +"Frame\n");
for c = 1 to myCams.count do
(
makeDir ("D:\\TestRenders\\"+(myCams[c]) as string);
print ("camera "+c as string);
renCam=getnodebyname (myCams[c]) exact:true
render camera:renCam frame:t vfb:false outputheight:250 outputwidth:250 outputfile:("d:\\TestRenders\\"+(myCams[c]) as string+"\\"+t as string+c as string+".jpg")
)
)
2) now i've also the need that i need to combine (stitch) all these images - 9 images into one image at the end and delete those 9 images. i'll need to automate it as i might end up with thousands of renders.
but i was wondering how i can merge these two steps into one : say i render each camera's image into a single image (region render ?) and i keep filling the whole image , which is like 100 in height and (250 * 9 cameras) in width ? this will merge the above 2 steps into one right ?
i have some thing like : (i'm missing and pls correct me ..)
global myCams=#("Camera01","Camera02","Camera03","Camera04","Camera05","Camera06","Camera07","Camera08","Camera09");
global renCam;
-- animationrange.end
for t = animationrange.start to 9 do
(
sliderTime=t;
print (t as string +"Frame\n");
for c = 1 to myCams.count do
(
makeDir ("D:\\TestRenders\\"+(myCams[c]) as string);
print ("camera "+c as string);
renCam=getnodebyname (myCams[c]) exact:true
rw=900 -- the overall width of the rendered image
rh=200 -- the height of the cropped row (ie 50 pixels high)
leftP=0
rightP=(leftP * c)
fname="d://TestRenders//bow.jpg" -- the filename of the output
------------------------------------------------------------
render camera:renCam frame:t rendertype:#region region:[(leftP*c),(leftP*c),(rightP+100),(rh)] outputfile:fname
-- render camera:renCam frame:t vfb:false outputheight:250 outputwidth:250 rendertype:#normal region:[0,0,20,20] outputfile:("d:\\TestRenders\\"+(myCams[c]) as string+"\\"+t as string+c as string+".jpg")
)
)
but i get -- Runtime error: Region rendering only available on active view >> then how do i use the renderType:region option ? and what does it mean by ' active view '?
can anybody guide me how to go about it ? how do i fill a image in blocks, each black -a render of each of my camera ?
rgds,
