unhide objects

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 06 June 2008   #1
unhide objects

Im having problems to unhide objects in a particle script test.

I hide the objects that i use as geometry in the birthscript, and want to unhide them when i delete the particles. i have a scripttest to test that all particles have returned to the original position, and in that scripttest i unhide. all works fine in the viewport but when i render the unhide command in the scripttest dosent work.
Attached Images
File Type: jpg PF_notworking.jpg (87.6 KB, 9 views)
 
Old 06 June 2008   #2
Originally Posted by danielw74: Im having problems to unhide objects in a particle script test.

I hide the objects that i use as geometry in the birthscript, and want to unhide them when i delete the particles. i have a scripttest to test that all particles have returned to the original position, and in that scripttest i unhide. all works fine in the viewport but when i render the unhide command in the scripttest dosent work.


Hiding/Freezing objects dynamically is NOT supported by the renderer. The hidden state of the objects is evaluated only once at the beginning of a render sequence because Max assumes that the hidden state cannot change mid-animation (as it is not keyframeable). This limitation (or optimization, if you want) was imposed in days when there was no scripting in Max. This also means that the scene evaluation is performed just once and if nothing changes, nothing has to be recalculated (this was something that worked even in 3d Studio Dos).

So you cannot perform hiding inside a script and expect your objects to disappear. What you can do though is control the value of the Visibility track which IS animatable and evaluated by the renderer on each frame.
__________________
Bobo
 
Old 06 June 2008   #3
thanks for the reply Bobo.

ah.. why didn't i think about that, now i have keyframed the visibility track going from 1 to 0 on specific frames.

but anyway.. it dosent work.

in the birth script i put the line "chunksarray.visibility = 0" and it works, all my chamferboxes get Visibility = 0. but when it comes to the scripttest and the line "chunksarray.visibility = 1" it wont work. have even tryed to print the chunksarray in the scripttest and it works, still the same objects thats in the birthscript.

it would be grate to get some solution of this, so i dont have to keyframe all visibility tracks of my chunks, cuse it gets slow when its 1178 objects.

-- thanks
Attached Images
File Type: jpg PF_Visibility.jpg (86.8 KB, 5 views)
 
Old 06 June 2008   #4
Animate the opacity of your material by particle age.
Set the animation curve to "step".
__________________
WilliamRickert.com
 
Old 06 June 2008   #5
Originally Posted by danielw74: thanks for the reply Bobo.

ah.. why didn't i think about that, now i have keyframed the visibility track going from 1 to 0 on specific frames.

but anyway.. it dosent work.

in the birth script i put the line "chunksarray.visibility = 0" and it works, all my chamferboxes get Visibility = 0. but when it comes to the scripttest and the line "chunksarray.visibility = 1" it wont work. have even tryed to print the chunksarray in the scripttest and it works, still the same objects thats in the birthscript.

it would be grate to get some solution of this, so i dont have to keyframe all visibility tracks of my chunks, cuse it gets slow when its 1178 objects.

-- thanks


Do the visibility tracks have CONTROLLERS assigned to them? The renderer will evaluate the visibility only if it is ANIMATED (using so-called validity intervals, Max skips anything that does not change over time).

The trouble is that you cannot create Keys during the playback of the script, so you would have to probably use an external script that sets the keyframes for each object based on the particle life (see my PFlow Baking script for Max 2009)

Alternatively, you could move and/or scale to 0,0,0 the objects out of sight when they have to be hidden.
__________________
Bobo
 
Old 06 June 2008   #6
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.
 
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:58 PM.


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