Sequential visibility

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
  12 December 2005
Sequential visibility

Hi,

This is a newby question :
I would like to have several objet in a group to appear each frame by frame (one after the other). I've been using the visibility tag and animating it, but for hundreds of objects I think an expression would do it faster. As I don't know XPresso I'm a bit stuck.
I think one solution would be to write an expression that says :

Object(index2)visibility=100 if object(index1)visibility=100 at time-1frame.

I then set the visibility for the first object in my group and voilà.

But how to do that in Xpresso ?

Any advice is welcome.

Thanks,

Salvador
 
  12 December 2005
Here's an expression for automatically switching visibility. Visibility duration in frames is set via User Data and the effect can be inverted. Just put your objects under the null and hit play.

EDIT: Expression updated. See below.

Last edited by Darter : 12 December 2005 at 10:06 PM.
 
  12 December 2005
Thank you very much Darter.

I see I've not been clear enough. What your script does is switch visibility on and off for one frame, what I want is the first object to appear on frame 1, the second on frame 2 while the object stays visible and so on till all my objects are visible. But as I'm quite a beginner, I would like you, if you have time, to explain me how your expression works.

I've been speaking with base80 who wrote me another expression that does it. I don't know if I'm allowed to post it here, but if you want it I can ask him.

Thanks again,

Salvador
 
  12 December 2005
No problem, I’ve added a setting for cumulative visibility switching so that it works as described.

The current frame is divided by the Duration value and rounded down to an integer by the FloatFunc node. When an object’s index equals this value (determined by the Compare node), its visibility is switched. The ‘Cumulative’ User Data setting changes Compare node’s function from = = to <= so that an object’s visibility will remain switched on/off for the rest of the sequence. The Modulo node keeps the Frame/Duration output between 0 and the object count so that visibility switching will cycle until the end of the frame sequence.

I'd be interested in seeing how base80 has approached the problem if he's happy for you to post the file.

Last edited by Darter : 12 December 2005 at 12:38 AM. Reason: Modulo option added to expression
 
  12 December 2005
Here it is, he agrees as long as I say it's his script.

Salvador
Attached Files
File Type: zip on-off.c4d.zip (32.9 KB, 54 views)
 
  12 December 2005
And by the way, thanks again for your explanation.

Salvador
 
  12 December 2005
I hope that the explanation makes sense.

I've updated the file to include a Modulo option so that this function can be turned off if desired. You may not need the various extra options but hopefully they make the expression useful in a wider range of situations.
 
  12 December 2005
Hi,

Explanation makes sense but I have to admit Xpresso is a bit complicated for me and I wouldn't be able to write such an expression at my level of understanding.

Coming from a more synthetic syntax in AE expressions wich I use for simple tasks, Xpresso nodes request a sort of "twisted" way of thinking I don't have yet. But it kindda reminds me when switching for the first time to Shake or orher nodebased compositing systems.


Thanks,

Salvador
 
  12 December 2005
Darter:
That xpression worked really great when I was trying to import an series of files exported from Blender's fluid simulation. (series of obj)

Once I get a little more elegant solution for doing it (rather than importing and arranging all the obj's by hand) I'll post in the main forum... other people may be interested.

But in any case, thanks for sharing!
 
  12 December 2005
Thanks for the feedback ascent, it's great to know that someone found the expression useful!
 
  12 December 2005
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 11:08 AM.


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