PDA

View Full Version : Script Node Execution


calvin1649
09-11-2009, 02:16 AM
All,
I have a script node that modifies the position of instanced geometry made with a particle grid. It's set to Execute On: Time Changed with before option set.

I noticed when I split up my render jobs that the renderer goes through all the frames before it starts to render the frame specified for that job. I put in a statement to print out the current frame location in the node script to verify that this is in fact happening.

So if I start my render job on frame 500 I see it counting up to 500 before the render starts. This takes a long time as it's calculating the positions for frames 1-499 first.

I tried setting Execute On: to Software Frame Render. That time, the render started right away, with no frame runup, but the object positions did not get calculated. I even tried saving the scene on the frame I wanted to start with, and that didn't work either (well I'm pretty sure I tried that...but that's a crummy workaround anyway).

My render command is as follows;
Render -r mr -s 101 -e 150 -rt 1 test3.mb
I'm using AO so I need mental ray. I have not seen if using Maya Renderer will do this. I will do some more experiments and post if no one can lend a suggestion. I can't be the only one with this issue.

Thanks in advance!

mtanaka
09-11-2009, 10:25 AM
How about using -preFrame option with Render command?

calvin1649
09-13-2009, 12:16 AM
How about using -preFrame option with Render command?

I thought of that, but it's a multi line script. I suppose I could put it in scripts path and call it, but is'nt that the same as having it in a script node and executing?

Andrei2k
09-13-2009, 11:59 PM
Sounds like you should just bake out the particles to seperate cache files as per broken up render file. So if your scene is broken into 3 frame ranges the respective particle cache would get read on render.

It would also mean that the script calculation only runs when you cache the particle and potentially save you time exponentially depending on the calculations.

calvin1649
09-14-2009, 05:50 PM
Ok,
I can't seem to get the particles in the particle grid to bake. It just animates the Particle Shape node itself. I know I'm missing something stupid and will be really embarrassed to have asked this.

Thanks!

Andrei2k
09-14-2009, 07:30 PM
I don't have access to Unlimited right now but you tried Solvers> create particle disk cache right?

It may be specific function to Fluids/Containers so if that doesnt do it I will have to get back to you. Let me know...

calvin1649
09-14-2009, 09:35 PM
Yeah,
I tried the solver disk cache route...this is driving me nuts. I just made a quick particle grid put a wind force on it for a test. I can't get it to bake that either. It just 'bakes the shapenode but nothing else, meaning I don't see any channles from MyParticles.[0] through MyParticles[8100] in the animation graph. I just see the channels from MyParticles. Which is odd, 'cause I selected MyParticlesShape..and have tried both Below and Selected for heirarchy.

Last time I used Maya, was on an R10K Octane in 2000. I seem to recall being able to bake the motion paths. I could then export them 'cause at one point, I had written a perl script to reverse the dynamic animation.

Thanks again for helping me out with this.

calvin1649
09-17-2009, 06:26 PM
I have got the solver cache to work. It no longer does the runup, but in batch render, the particles do not move. I had to write a MEL Script to use the internal MentalRay renderer to get the animation to play.

I cannot get any dynamic cached particle animations to render with the batch renderer. I guess this needs to be a new thread.

CGTalk Moderation
09-17-2009, 06:26 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.