PDA

View Full Version : Render Help


ramesh03
01-02-2008, 09:18 AM
Hi,

cams = #($Camera01,$Camera02,Camera03,Camera04)
for i=1 to 5 do
(
r = render camera:cams[i] fromframe:1 toframe:20 outputwidth:170 outputheight:120
r.filename = cams[i]
save r
)

I am new to Max.I want to render my scene with .swft format with 5 cameras.i wrote one script for this i dono whts wrong here. Anybody can help pleaseeeee.....

Thanks.

Bobo
01-02-2008, 09:52 AM
Hi,

cams = #($Camera01,$Camera02,Camera03,Camera04)
for i=1 to 5 do
(
r = render camera:cams[i] fromframe:1 toframe:20 outputwidth:170 outputheight:120
r.filename = cams[i]
save r
)

I am new to Max.I want to render my scene with .swft format with 5 cameras.i wrote one script for this i dono whts wrong here. Anybody can help pleaseeeee.....

Thanks.

First, you have an array of four cameras, but the last two are missing the $ to denote a scene node.
Then you have a loop from 1 to FIVE, but you have FOUR cameras.
Then you render into a MAXScript bitmap r, but it cannot contain a SWF file. I am not even sure how well the render() method in MAXScript deals with SWFs. What you did would work with bitmap files like .TGA, .RPF, .EXR etc. You might want to try supplying the file name to the render() method instead using the outputfile: keyword.

Your file name wouldn't work because a camera node cannot be a file name. You can use the NAME of the camera to build some file name though...

Also, you don't need the i index, so you could say

for aCamera in cams do
(
r = render camera:aCamera fromframe:1 toframe:20 outputwidth:170 outputheight:120 \ outputfile:(GetDir #image + "\\" + aCamera.name + "_.swf")
)

ramesh03
01-02-2008, 11:51 AM
Yah, Thanks for this help.

i modified my script like this but it showing one Error.i want all cameras output with camera name as a file name and with .swft format(I have this plug-in)

cams = #($Camera01,$Camera02,$Camera03,$Camera04)
for aCamera in cams do
(
r = render camera:aCamera fromframe:1 toframe:20 outputwidth:170 outputheight:120
outputfile:(GetDir #image + "\\" + aCamera.name + "_.swft")
)

RustyKnight
01-02-2008, 10:51 PM
Yah, Thanks for this help.

i modified my script like this but it showing one Error.i want all cameras output with camera name as a file name and with .swft format(I have this plug-in)

cams = #($Camera01,$Camera02,$Camera03,$Camera04)
for aCamera in cams do
(
r = render camera:aCamera fromframe:1 toframe:20 outputwidth:170 outputheight:120
outputfile:(GetDir #image + "\\" + aCamera.name + "_.swft")
)
outputfile:((GetDir #image) + "\\" + aCamera.name + "_.swft")There may be other problems, but that one jumps out at me...

Shane

ramesh03
01-03-2008, 04:31 AM
Thanks.

This is the final script:

cams = #($Camera01,$Camera02,$Camera03,$Camera04)
for aCamera in cams do
(
r = render camera:aCamera fromframe:1 toframe:20 outputwidth:170 outputheight:120
outputfile:((GetDir #image) + "\\" + aCamera.name + "_.swft")
)

But when i run this scrip.It showing this Error.Whts wrong here.

-- Syntax error: at keyword parameter, expected <factor>
-- In line: outputfile:(

RustyKnight
01-03-2008, 04:43 AM
Thanks.

This is the final script:

cams = #($Camera01,$Camera02,$Camera03,$Camera04)
for aCamera in cams do
(
r = render camera:aCamera fromframe:1 toframe:20 outputwidth:170 outputheight:120
outputfile:((GetDir #image) + "\\" + aCamera.name + "_.swft")
)

But when i run this scrip.It showing this Error.Whts wrong here.

-- Syntax error: at keyword parameter, expected <factor>
-- In line: outputfile:(This is probably a bit silly and it is a little hard to tell...until you paste into a proper text editor/the maxscript editor, but

r = render camera:aCamera fromframe:1 toframe:20 outputwidth:170 outputheight:120 This line ends with a newline...which seperates the next line from the current command...

Now if that doesn't make sense, that's okay, basically, the output: parameter MUST be on the same line...so, go back to you editor, jump to the start of "output" and press back space to move the parameter back onto the same line as the render command...should be okay then...at least it worked for me...
r = render camera:aCamera fromframe:1 toframe:20 outputwidth:170 outputheight:120 outputfile:((GetDir #image) + "\\" + aCamera.name + "_.swft")

Shane

ramesh03
01-03-2008, 05:41 AM
oohhhhhh...

Yah,Its working but, it going to default "scenes" folder with file name "untitled.swft" and every time it replacing the existing one(not creating with cameras name).How to solve this ?

Thanks.

CGTalk Moderation
01-03-2008, 05:41 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.