# Mel Script To Control Visibility, Based On Proximity?

**URL:** https://forum.highend3d.com/t/mel-script-to-control-visibility-based-on-proximity/1102
**Category:** Maya
**Tags:** mel
**Created:** [March 28, 2009, 12:08pm UTC](https://forum.highend3d.com/t/mel-script-to-control-visibility-based-on-proximity/1102 "2009-03-28T12:08:35Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![oliverwolfson](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/o/85f322/32.png) [@oliverwolfson](https://forum.highend3d.com/u/oliverwolfson)
#### Post date: [March 28, 2009, 12:08pm UTC](https://forum.highend3d.com/t/mel-script-to-control-visibility-based-on-proximity/1102/1 "2009-03-28T12:08:35Z")

</div>

Any one know of a mel script to control visibility, based on the proximity of a vertice? Or face?

Would also be cool if the geometry that becomes visible could take on the color of the geometry at that particular point.

Thanks for any help.

---

<div class="post-metadata">

### Author: ![joojaa](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/j/5daacb/32.png) [@joojaa](https://forum.highend3d.com/u/joojaa)
#### Post date: [March 28, 2009, 12:25pm UTC](https://forum.highend3d.com/t/mel-script-to-control-visibility-based-on-proximity/1102/2 "2009-03-28T12:25:07Z")

</div>

One would not be terriby hard to make. Bossibly slow depening on boder contraints or then not.

QUOTE  
Would also be cool if the geometry that becomes visible could take on the color of the geometry at that particular point.

Before or after shading?

Problem with color after shading is that ist not known untill ist shaded so youd need soem multipass functionality where you preprocess the step before actual use.
