Visibility by Distance

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.

Visibility

Follow up:

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.

display-tag

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.

setup-hierarchy

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.

display-tag

I'll do a separate tutorial about the hierarchy node and other iteration nodes asap.

9 comments

Comment from: Kutkin [Visitor] · http://sweb.cz/animos_pc : 2006-04-07 @ 17:19
All this tuts are just great!
base80, how do you do this nice gif animations? If i render out a movie and then convert it to gif animation, its all grainy and badlooking... The yours looks almost like a vector animation...
Thanks
Comment from: lamlaude [Visitor] : 2006-06-30 @ 16:28
Great tutorial.. but I am not getting any results. Can you check my file and see what am I doing wrong?
Thanks!
Comment from: base80 [Member] Email : 2006-06-30 @ 18:54
This site is made on an as-is basis. I don't fix files, I only try to make as many useful tutorials as I can.
Comment from: gregg pierce [Visitor] : 2006-11-25 @ 02:38
I have the same problem with my file , everything is as the tut,but not fading from target.
Comment from: Mike [Visitor] · http://www.dhanimations.com : 2007-01-05 @ 10:55
I've done the tut from scratch 3 times and i'm not getting any fading either, any ideas where we could be going wrong base80?
Comment from: Josh [Visitor] : 2007-02-04 @ 19:30
Hi, I was wondering if you can make a tutorial on rendering. All of the gifs on this site look very clean. What settings do you use?
Comment from: base80 [Member] Email : 2007-02-05 @ 17:45
I am not sure I will do that. It is just a rendering with an even background (see related tutorial). I save the animation as a .mov, then I convert to gif in image ready with standard settings ( I actually have a droplet that does that for me)
All my renderings a very basic with one Spot for shadows and an Omni to light the dark areas. Render times are extremely short.
Most animations are 3 seconds and 15 frames per second (total 45 frames).

Related tutorials
http://www.base80.com/index.php/2006/01/25/make_an_even_background_c4d_basics
and
http://www.base80.com/index.php/2005/08/22/tip_new_c4d
Comment from: GrahamJ [Visitor] Email · http://fivth.com : 2008-09-24 @ 22:10
*****
Great tutorial and I'm excited to discover this site.
Regarding all of the comments from folks who couldn't get the tutorial working:
I believe you need a Tag iterator to feed into the Display node's properties... connect Tag's "object" input port to the Hierarchy's "object" output port and the Tag node's "Tag" port to the Display's "object" input port.
Comment from: svenja [Visitor] Email · http://svenjafrahm.de : 2008-12-17 @ 15:18
I just had the same problem -
you have to swap the range mappers output to lower:1 and upper: 0, then it works perfectly! :)

Leave a comment


Your email address will not be revealed on this site.

Your URL will be displayed.
PoorExcellent
(Line breaks become <br />)
(Name, email & website)
(Allow users to contact you through a message form (your email will not be revealed.)
This is a captcha-picture. It is used to prevent mass-access by robots.
Please enter the characters from the image above. (case insensitive)