PDA

View Full Version : Black screen on batch render using Syflex



martin242
07-25-2006, 10:28 AM
I have the following problem:
I've created a simple Syflex simulation and render the current frame with both Maya Software and Mental Ray and everything works great.
Then, I run the batch render and all I get are black images.
What could it be? I tried almost everything with no results :frown:

sunder
07-25-2006, 11:09 AM
Are you using a render farm?
Syflex is seen as normal polygon geometry so theoretically it shouldn't pose rendering problems. Double check that MR is batch rendering correctly by introducing a non-syflexed object. If that shows up then try caching your cloth files and then do the render.

martin242
07-25-2006, 12:18 PM
I'm not using a render farm.
Non-Syflex objects are being rendered correctly but I can't see my cloth.
What do you mean by caching my cloth files?

sunder
07-25-2006, 12:39 PM
Caching the sycloth means to store the cloth's motions into individual files (one for each frame); that way once simulated, you don't need to resimulate the cloth. Pull up the Attribute Editor for your sycloth and use the Cache Name attribute to set up the cache files. If you have the SyFlex training kit, I can direct you to the lessons on caching.
Usually, I can render sycloth properly in MR without caching the files but perhaps it may help you out. Are you using any special shaders on the cloth?

martin242
07-25-2006, 12:55 PM
I'm using the default lambert shader.
It's weird because it works when I render an indiviual frame but not in the batch rendering. I have the Syflex Training Kit but didn't finish it yet.
Would you tell me what lessons to check?
The cache solution may work, but I feel the problem is somewhere else.

sunder
07-25-2006, 01:18 PM
Take a look at Disc 2, lesson 19 - around the halfway point. You'll see the process of caching the cloth wings. Try doing the same steps on your cloth sim and check if MR will render it out.
Where do you suspect the problem lies? Also, do you run into this issue with the Software renderer?

martin242
07-25-2006, 01:37 PM
Ok. I cached the simulation but still the same problem with both MR and Software render. Again... the problem is when I do a batch render only.
I can render single frames with both renderers perfectly and all the objects are displayed. When I do a batch render I can only see my non-syflex objects. :confused:

sunder
07-25-2006, 01:48 PM
I think this narrows the issue a bit. Are you using a spotlight? Also, look at the alpha channel of the image and tell me if you see the cloth.

martin242
07-25-2006, 02:06 PM
There where no lights in the scene. Just the default.
No I added a spotlight and it's all the same.
When I render a single frame the alpha channel looks good and I can see everything. When batch rendering the alpha channel is full white and I can only see my non-syflex objects on the color channel.

sunder
07-25-2006, 03:08 PM
I can't reproduce this scenario at all. Does this happen every time or in every scene? What's going on in the scene and how did you set it up?
If you change the environment color of the camera, does the background still turn up as black?

martin242
07-25-2006, 09:05 PM
Well... i just start opening Maya, creating a plane then a polygon sphere, I create the cloth, gravity, damp, collider, everything looks great.
I render a single frame and it renders ok both in MR and Software.
I run the batch render and I only see my sphere. No cloth.
Changed the enviroment color of the camera and still no cloth.
Why can be a batch render different from a normal render???? I just don't get it.
I pray the gods for help! :bow

martin242
07-25-2006, 10:02 PM
I was browsing the net for more info and found this:

"this is what Gerard (from syflex) has to say about batching...

Yes you can [batch], it just needs a little trick:
Maya updates the nodes because it needs to visualize objects. In batch mode, there is no visualization to propagate an update of all the nodes. So you need to force one, for instance by getting any attribute on the final mesh::
getAttr objectmesh.cp[0]
This will force the syCloth node to be updated, and will cache the sim.
You will need to do a loop on the time (currentTime -e ...)."

But as I'm a newbie in Maya I don't know how to implement this.
Any clues?

martin242
07-26-2006, 08:29 PM
Ok. Solved it. :yes
It's a Syflex problem.
I fixed it running this little MEL script when I want to batch render:

int $i;
for ($i = 0; $i < x; $i++) {
currentTime $i ;
render;
}

Where "0" is your starting frame and "x" is your ending frame +1.
There might be better ways to do it but this works.
The images get stored in your project's images folder.

danotronxx
01-20-2007, 12:12 AM
hey martin I got the exact problem as yours but i still dont get how you got it. i tried executing the script but then what. do you go to batch render after or are u just suppose to run the script? thanks.

danotronxx
01-20-2007, 01:54 AM
o wait I figured it out!!! I will sleep well tonight!!! your the best martin im so happy! thanks for your research:bounce2: