PDA

View Full Version : you all probably know this...


(B-HOLM)
04-02-2003, 05:41 PM
hey all, I remember reading somewhere that it wasn't possible to create stuff while an animation is running, but I found out that it is possible to make something like this in the expression editor:

if( frame == 40 )
{
polyCube -n Cube ;
}

Well, I know this is nothing, 'cause instead of this then you'd might as well just toggle the visibility for the Cube.
But maybe if the script made a loop or something, then maybe this would be a cool thing ?
Was just wondering if anybody ever uses a thing like this? (creating stuff in the middle of an animation)
Uhm, and yea I know the thread is maybe a bit weird, but I just thought I'd share what I've just found out hehe.

Maya Ayanami
04-02-2003, 06:09 PM
cool.
and no I haven't tried to do this.
I think it would be usefull when using dynamics with a mass of non-particle objects.

Hugh
04-02-2003, 06:18 PM
The only use I can really think for this would be doing some kind of home-made particle system (why would you want to?) or something for creating objects along a path....

Both of which are already available using a lot easier methods....

Can you imagine if you forgot this was here, and just played your animation back a few times.... (that could get messy!)

(B-HOLM)
04-02-2003, 06:23 PM
ahh Hugh, hadnt thought if that issue :/
nevermind this thread then, but still happy I leanred something :D

mark_wilkins
04-02-2003, 08:07 PM
No, it's absolutely possible to create whatever you like while animation is running. However, it's usually a very bad idea in a real scene:

* Creating objects forces the entire dependency graph to be recalculated. When you have lots of deformers in your scene, this can make execution of the frame where the object's created VERY slow.

* It doesn't work properly if you rewind -- in other words, play the scene back and then rewind and you'll see the object is still there. Play back and you'll get a SECOND object.

* Using this technique is not compatible with splitting up the frames to different machines on a render farm -- the object in question will only appear on frame 40, or possibly on a short range of frames after 40 if you're chunking your renders.

* Putting such behavior in an expression can make it very difficult to figure out where problems are occurring in your shot. Expressions are manageable when their effects on your scene are limited to their output connections, but once you start futzing with arbitrary MEL commands they become a huge mess to debug.

-- Mark

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