View Full Version : Visibility linked to a volume
06-06-2006, 01:26 PM
hey you guys
is there anyway of linking the visibility of an object to a volume?
i.e. when an oject is within a cube it will render and when it passes out of the cube it wont render?
I've been trying and getting nowhere fast :)
06-06-2006, 10:01 PM
Shouldn't be too hard...
You can approach this using a complete scripted operator, or using built-in tools...
If the volume you want to use can be represented by a implicit primitive, for example the cube you mention, then you can use the Bounding Volume constraint to do your checking. Set the mode to "monitor only", which will update the location parameter on the constraint. Now you can write a expression on the objects visibility (render/view) and use that parameter in a condintional function.
For reference, the location parameter values are:
"Undefined" = 0
"Outside" = 1
"Inside" = 2
"On Surface" = 3
"Intersecting" = 4
(Note, this would have to be set up for every object that you want to control in this way)
Too quick to send. I have just checked my advice, and there is a distinct lack of update with the expression, but a simple SCOP would fix that
06-07-2006, 07:32 AM
Thanks for the reply. this worked out good enough for my needs.
06-08-2006, 01:54 PM
you can play with primary/secondary rays too. make your volume a absolute transparent object. then say that the objects inside the volume has only secondary rays active. So when the objects are inside they'll render, outside they'll not.
06-09-2006, 02:55 PM
That was a really great solution. So easy and works so well!!!
There's also Alan Jones' BoolTrace shader.
06-09-2006, 03:37 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.
vBulletin v3.0.5, Copyright ©2000-2014, Jelsoft Enterprises Ltd.