PDA

View Full Version : render with MEL!?


X-Tender
03-12-2003, 06:56 PM
ho .. i need to know how i can render my current view with a ressolution of 50x50, AA, bmp, spezify path..

i hope someoneknow it =)

gmask
03-12-2003, 07:00 PM
Originally posted by X-Tender
ho .. i need to know how i can render my current view with a ressolution of 50x50, AA, bmp, spezify path..

i hope someoneknow it =)

render.exe -h

alexx
03-12-2003, 07:41 PM
you mean inside maya from the render view or via command line rendering?

btw: welcome :) better than IRC isnīt it?

gmask
03-12-2003, 07:45 PM
Originally posted by alexx
you mean inside maya from the render view or via command line rendering?

btw: welcome :) better than IRC isnīt it?

It sounds lik he wants to render icons or something from within the program which you can do with the "render" MEL command but it doe sallow you to specify image format or filepath so you could use the render.exe command within the MEL system command I suppose for the additional arguments.

X-Tender
03-12-2003, 07:50 PM
yeah, i want render some small icons ;) .. but it must be ncludet in an anotehr long script .. so i must make it with mel ;) .. i try render.exe .. maybe i find somethng ..

mark_wilkins
03-12-2003, 08:58 PM
I believe if you're doing batch software rendering you *have* to do it using the render binary rather than some generic MEL script with maya -batch.

At least, when I was working on Maya rendering scripts at PDI I had all kinds of problems getting the results I needed with the render MEL command and setting render globals settings in a MEL script.

Maybe this has changed? We were using 3.0 at the time...

-- Mark

gmask
03-12-2003, 09:07 PM
Originally posted by mark_wilkins
I believe if you're doing batch software rendering you *have* to do it using the render binary rather than some generic MEL script with maya -batch.

At least, when I was working on Maya rendering scripts at PDI I had all kinds of problems getting the results I needed with the render MEL command and setting render globals settings in a MEL script.

Maybe this has changed? We were using 3.0 at the time...

-- Mark

Yeah. I've come across several commands in Maya recently thatmake it really hard to automate because it is not obvious how to set the parameters except through the interface..argh!!!

I guess you could try assignign the parameters to the render globals and then use the MEL render command.. I haven't tried it.

X-Tender
03-12-2003, 09:13 PM
i use it this way

string $plress[] = `listConnections defaultRenderGlobals.resolution`;
setAttr defaultRenderGlobals.imageFormat 20;
setAttr ($plress[0]+".width") 50;
setAttr ($plress[0]+".height") 50;
setAttr -type "string" defaultRenderGlobals.imageFilePrefix "";
render persp;

but after the render i have a picture called "_perspShape_tmp" ;/ its a Bitmap .. but how can i give the render a filename? .. and the path ..

mark_wilkins
03-12-2003, 09:44 PM
Oh, yeah, I think the file naming was where the problem came in with rendering from a MEL script... regardless of the render globals settings I couldn't get consistent file naming without using the render command in the external script!!!

So, what I'd do is write an external script that would run a maya -batch command to set the scene up for rendering, have the MEL script save the resulting scene file in a temporary directory, and then use the Render command to render that temp scene file.

-- Mark

X-Tender
03-12-2003, 10:01 PM
well .. is solve it with the system("ren .. command .. nowit works fine ..

mark_wilkins
03-12-2003, 10:40 PM
Yikes!

You do realize that this results in two copies of Maya running at the same time with two copies of your scene open, right??

Hope it's not a very heavy scene...

-- Mark

X-Tender
03-12-2003, 10:46 PM
hmm . it copy it first after the render .. because i build in a pop up window who ask if the rende risok or not .. and if it is ok it rename and copy it ..

CGTalk Moderation
01-14-2006, 04:00 PM
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.