PDA

View Full Version : command-line rendering & render layer flags


TheArtifier
12-22-2010, 10:48 PM
I need to know if there is a way to batch render specific layers via a command-line render. I have an animated scene and I need to render certain render layers out to specified frames. for example I need to render renderlayer#1 out to frames 1 through 12 and renderlayer#2 out to frames 13 through 25.

I have been researching command-line rendering in search of a solution to my needs and I have gotten close but I am still not quite there.

I have gotten it to render specific cameras with specific set of frames but it renders all the render layers. So I thought there would be flags that turn off certain named render layers or turns them on. I found what I feel should work and that is a boolean command as follows:

-rl <boolean>|<name(s)> render each render layer separately

so I created this script:

Render -r mr -cam RenderCam1 -rl 0 Color_90,AO_90,Shadows_90 -log renderlog.txt -s 1 -e 12 -im HamsterEating_VW1 -rd C:\Users\Daves_Asus\Documents\ArtBin\GeneologyGame\FamilyTree\images\HamsterEating\Cam_1 HamsterEating_2.ma

Render -r mr -rl 0 Color1,AO1,Shadows1 -log, renderlog2.txt -cam RenderCam_90 -s 13 -e 25 -im HamsterEating_VW90 -rd C:\Users\Daves_Asus\Documents\ArtBin\GeneologyGame\FamilyTree\images\HamsterEating\Cam_90 HamsterEating_2.ma

I have had this script run just fine before trying to impliment the '-rl 0 Color1,AO1,Shadows1' and '-rl 0 Color_90,AO_90,Shadows_90'

but i really need to control which layers render.

I am wondering why this doesn't work. Is my formatting wrong? Is there a way to do this?

it should work becuase -rl is the render layer flag '0' should turn of the layers that follow by name (separated by commas).

any direction on this matter would be much appreciated.

oh the error I get with this script is the following:

More than one file name is not allowed: -s ...
I have checked for spaces in the names of my files but I didn't see any.

haggi
12-23-2010, 10:34 AM
I never used renderlayer but if I follow the manuals, you should write

-rl 0:Color_90


And you haven an error in your second command where you have a ',' behind the -log switch.


Render -r mr -cam RenderCam1 -rl 0 Color_90,AO_90,Shadows_90 -log renderlog.txt -s 1 -e 12 -im HamsterEating_VW1 -rd C:\Users\Daves_Asus\Documents\ArtBin\GeneologyGame \FamilyTree\images\HamsterEating\Cam_1 HamsterEating_2.ma

Render -r mr -rl 0 Color1,AO1,Shadows1 -log, renderlog2.txt -cam RenderCam_90 -s 13 -e 25 -im HamsterEating_VW90 -rd C:\Users\Daves_Asus\Documents\ArtBin\GeneologyGame \FamilyTree\images\HamsterEating\Cam_90 HamsterEating_2.ma

TheArtifier
12-27-2010, 05:55 PM
I assume by manuals you mean the Maya documentation/help, I searched through it for answers but did not fond anything really specific. I did not find anything that explained putting it in that format.

Anyway thanks Haggi for the input I was very excited to give it a try but it did not work for some reason, maybe something else is wrong with my script. I did take out the comma, thanks again for pointing that out.

However; all I keep getting is:
More than one file name is not allowed: -s ...

Perhaps I will just have to make do and create two files from my one file splitting up the two sets of render layers. Though it doesnt make sense to me that you cannot disable render layers especially when I see that there are render flags (-rl). Very frustrating. I think there is something I do not know about it. Something missing..........

Here is the way my script looks now:

Render -r mr -cam RenderCam1 -rl 0:Color_90 -log renderlog.txt -s 1 -e 12 -im HamsterEating_VW1 -rd C:\Users\Daves_Asus\Documents\ArtBin\GeneologyGame\FamilyTree\images\HamsterEating\Cam_1 HamsterEating_2.ma

Render -r mr -rl 0:Color1 -log renderlog2.txt -cam RenderCam_90 -s 13 -e 25 -im HamsterEating_VW90 -rd C:\Users\Daves_Asus\Documents\ArtBin\GeneologyGame\FamilyTree\images\HamsterEating\Cam_90 HamsterEating_2.ma

haggi
12-27-2010, 08:05 PM
No empty spaces are allowed. You have as file name:

\FamilyTree\images\HamsterEating\Cam_1 HamsterEating_2.ma

I avoid spaces whereevery I can. Maybe quoting can help:

"\FamilyTree\images\HamsterEating\Cam_1 HamsterEating_2.ma"

CGTalk Moderation
12-27-2010, 08:05 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.