Using a .bat file with maya hair

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
Old 04 April 2012   #1
Using a .bat file with maya hair

Hi, I'm having some issues with rendering maya hair using a bat file. Its rendering the scenes complete with hair when I render a single frame in maya, but the moment i try to use a bat file or a renderfarm to render, the maya hair gets completely excluded from the render. I don't suppose anybody has any idea why that might be? I've been able to find a few old threads that recommend converting pfx to polys, but thats not really going to do it on my scenes as the number of polys needed to do that is massive and way beyond my computers capability.

Any help will be greatly appreciated as I have a lot of scenes to render and would prefer to be able to set up multiple renders than have to sit by my computer waiting for one scene to finish to start the next.
 
Old 04 April 2012   #2
I can now confirm it doesn't work with either mr or maya software.
Batch rendering within the software also doesn't work. it seems to only work in single frame render.

Last edited by TheNDGhost : 04 April 2012 at 01:58 PM.
 
Old 04 April 2012   #3
batch render process with maya hair

so apparently Maya hair does not play well with the batch render process. Even when you cache the hair, the batch renderer will ignore the cache and do a run-up that takes a very long time. In my case 4 hours. Then the rendering start at a few minutes per frame.

I looked everywhere and all that I see are people complaining about it. Some changing the code which I do not know how to do. Others using a script to use a different batch renderer but I can not do that since I am using a render farm.

If you find a solution please post it. This is a serious issue that needs to be addressed.
 
Old 04 April 2012   #4
Unfortunately I haven't found any solutions as to getting the hair to render on a farm. I was able to find a script however that renders each frame individually like the renderview I had to make some adjustments to the script to get it to work for me properly, and I don't really know much about scripts so I don't know why it wasn't working originally.

The script was written by NextDesign at simplymaya

Here is the script I started with:

string $filename = "render";
string $cameraName = "persp";

int $startFrame = 1;
int $endFrame = 24;

string $directory = (`workspace -q -rd` + "images/");

for ($i = $startFrame; $i <= ($endFrame - $startFrame); $i++)
{
currentTime $i;

render -x `getAttr defaultResolution.width` -y `getAttr defaultResolution.height` $cameraName;

string $concatFilename = $directory + $filename + "." + $i;

renderWindowSaveImageCallback ("renderView", $concatFilename, `getAttr defaultRenderGlobals.imageFormat`);

print ("Saved " + $concatFilename + "\n");
}

print ("Completed rendering of " + ($endFrame - $startFrame) + " frames.\n");


I could not get the saving part to work properly and it was preventing the script from running so I removed that line. I also noticed that the for loops conditions were odd and changed those. With my changes it runs through the entire code without issue and saves all my frames in images/tmp instead of images. The naming is using that set in the render settings because i removed that part of the script.

This is what I ended up with. If anybody knows of a way to improve on it I'd be grateful. Maybe a way to get that save function working in maya 2012.

string $filename = "render";
string $cameraName = "persp";

int $startFrame = 1;
int $endFrame = 24;

string $directory = (`workspace -q -rd` + "images/");

for ($i = $startFrame; $i <= $endFrame; $i++)
{
currentTime $i;

render -x `getAttr defaultResolution.width` -y `getAttr defaultResolution.height` $cameraName;

string $concatFilename = $directory + $filename + "." + $i;

print ("Saved " + $concatFilename + "\n");
}

print ("Completed rendering of " + ($endFrame - $startFrame) + " frames.\n");


As I said at the beginning though jmarcus, I haven't found a way to get hair to render on a renderfarm. I have read somewhere about people converting the hair to polys but my machine could not handle the 3 million polys that converting to polys required, per person.

The odd thing is that in the past when i was still learning maya 2012 and just starting with hair simulation, my dynamics tests batch rendered perfectly.

Sorry I couldn't be more help for you jmarcus.

Last edited by TheNDGhost : 04 April 2012 at 01:00 PM.
 
Old 04 April 2012   #5
Thread automatically closed

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.
__________________
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
 
Thread Closed share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 08:50 AM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.