Original written by: base80
April 5th, 2006
Here is a tutorial and a tip.
The tip is about using the Display Tag’s Visibility to fade objects.
The tutorial is about the hierarchy node to determine witch objects to fade.
[More:]
First lets start with the tip about the Display Tag.
As you can see there is a Visibility option in this tag, it serves to make objects more or less visible.
In my opinion this option should be in the Compositing tag because it alters the rendering but never mind me.
Most other options of the display tag alter appearance in the viewport.
OK Lets start the Tutorial.
What we are going to do is to make 5 Spheres fade according to their distance to a target.
The 5 Spheres are in one null called “All-Spheres”.
And there is a separate null called “Visibility Target”.
Add a Display-Tag to each of the 5 spheres.
Add an Xpresso tag to a null and open the xpresso editor.
Drag the “Visibility-Target” null,1 Sphere and 1 Display tag in the editor.
It doesn’t matter witch sphere or display tag it is as long as there is one present.
Lets start the setup to determine the sphere to influence the visibility of.
Add a Hierarchy-node to the setup and click on it.
In the Attribute Manager you must determine the reference null containing the spheres, drag the “All-Spheres” null in the reference field.
The Hierarchy node is set (as default) to search for objects starting one step down (D) from the parent and to loop thru each next (N) object.
What the hierarchy node does is to output all the next objects within the parent null.
It outputs ALL the objects at EVERY frame.
Keep in mind that this node is a little bit abstract and the result is not very visible in the xpresso editor.
Now connect the Object port of the Hierarchy-node to the object port of the Sphere and the Display-Tag.
We now have the basis setup to “talk” to all the spheres and all the display tags one by one.
Now we are going to determine the distance between the spheres and the “Visibility Target” null.
Add a Distance Node to the setup and connect the global position of the Sphere and the Visibility tag to its in-ports.
To make the output useful I added a Range-Mapper node.
Set the Input-Upper to the value (distance) you want your objects to fade and set the Output-Lower to 0 and Output-Upper to 1.
Connect the result to the display-tag’s Visibility port.
What you get is that objects fade when further away from the target.
Position or animate your spheres to see the result.
I’ll do a separate tutorial about the hierarchy node and other iteration nodes asap.