# V-ray distance problem

**URL:** <https://forums.chaos.com/t/v-ray-distance-problem/101480>\
**Category:** General\
**Created:** [November 6, 2020, 12:48pm UTC](https://forums.chaos.com/t/v-ray-distance-problem/101480 "2020-11-06T12:48:10Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![bruna\_bastos](https://avatars.discourse-cdn.com/v4/letter/b/65b543/32.png) [@bruna\_bastos](https://forums.chaos.com/u/bruna_bastos)\
**Post date:** [November 6, 2020, 12:48pm UTC](https://forums.chaos.com/t/v-ray-distance-problem/101480/1 "2020-11-06T12:48:10Z")

</div>

Hi Guys,

I am having some problems with the v-ray distance tex.  
Here is what is happening i am trying to mimic a max workflow when using the distance texture.  
I was trying to mimic adam martin workflow, something really simple. He plugged a texture on the distance texture atribute.

 ![Capturar.JPG](https://europe1.discourse-cdn.com/chaosprd/original/3X/6/7/67ecfa564ecebd326412168869e9386cf2821d48.jpeg)

In maya i tried to do something similar beacause we dont have a input where we can input a texture in the distance and still input a value for the distance and change both at the same time as we do in max.  
So what i did was that i used a layered texture and in the first layer a i was just input the numerical value for the distance in the texture slot of the layer (changing the value slot).  
In the second layer i was plugging a texture and selecting the add blending mode but the result was affecting the whole radius of the distance. I never was abble to get the same result.

 ![unknown.jpg](https://europe1.discourse-cdn.com/chaosprd/original/3X/b/2/b2c2f41279d208afedf611344eca72655764cbc5.jpeg)

Thanks Guys

---

<div class="post-metadata">

**Author:** ![hermit.crab](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/hermit.crab/32/46825_2.png) [@hermit.crab](https://forums.chaos.com/u/hermit.crab)\
**Post date:** [November 10, 2020, 5:15pm UTC](https://forums.chaos.com/t/v-ray-distance-problem/101480/2 "2020-11-10T17:15:58Z")

</div>

I’ll see if we can do something about this. Try plugging the Layered Tex (you may use a Ramp to set up a vignetting effect) in the Near Color slot; this will allow you to control the diameter through the distance value.

---

<div class="post-metadata">

**Author:** ![bruna\_bastos](https://avatars.discourse-cdn.com/v4/letter/b/65b543/32.png) [@bruna\_bastos](https://forums.chaos.com/u/bruna_bastos)\
**Post date:** [November 11, 2020, 2:07am UTC](https://forums.chaos.com/t/v-ray-distance-problem/101480/3 "2020-11-11T02:07:35Z")

</div>

I use te ramp inside the layered texture? Or after the distance node?

---

<div class="post-metadata">

**Author:** ![hermit.crab](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/hermit.crab/32/46825_2.png) [@hermit.crab](https://forums.chaos.com/u/hermit.crab)\
**Post date:** [November 11, 2020, 4:13pm UTC](https://forums.chaos.com/t/v-ray-distance-problem/101480/4 "2020-11-11T16:13:34Z")

</div>

Inside the Layered Texture so as to get a similar to the mapped distance tex (in 3ds Max) vignetting effect.

---

<div class="post-metadata">

**Author:** ![bruna\_bastos](https://avatars.discourse-cdn.com/v4/letter/b/65b543/32.png) [@bruna\_bastos](https://forums.chaos.com/u/bruna_bastos)\
**Post date:** [November 19, 2020, 1:15pm UTC](https://forums.chaos.com/t/v-ray-distance-problem/101480/5 "2020-11-19T13:15:40Z")

</div>

Hi Aleksandar!

This is what happens when i plug the ramp in the near color slot!

 ![Capturar.JPG](https://europe1.discourse-cdn.com/chaosprd/original/2X/5/5180a14be20b9780342b5760dcda7f8e2771f26c.jpeg)  
Do you have any other idea?  
 ![Capturar.JPG](https://europe1.discourse-cdn.com/chaosprd/original/2X/5/5180a14be20b9780342b5760dcda7f8e2771f26c.jpeg)

---

<div class="post-metadata">

**Author:** ![hermit.crab](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/hermit.crab/32/46825_2.png) [@hermit.crab](https://forums.chaos.com/u/hermit.crab)\
**Post date:** [November 20, 2020, 10:15am UTC](https://forums.chaos.com/t/v-ray-distance-problem/101480/6 "2020-11-20T10:15:26Z")

</div>

Simply put your splatter texture in the Near Color slot. The mentioned ramp was just an additional process for finetuning.

---

<div class="post-metadata">

**Author:** ![bruna\_bastos](https://avatars.discourse-cdn.com/v4/letter/b/65b543/32.png) [@bruna\_bastos](https://forums.chaos.com/u/bruna_bastos)\
**Post date:** [June 18, 2021, 1:04pm UTC](https://forums.chaos.com/t/v-ray-distance-problem/101480/7 "2021-06-18T13:04:42Z")

</div>

Hi hermit! i was never abble to make this work. To day i was trying to do something similiar in the radius slot of the vray dirt and got a similar result! You were able to find a way around this?

---

<div class="post-metadata">

**Author:** ![hermit.crab](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/hermit.crab/32/46825_2.png) [@hermit.crab](https://forums.chaos.com/u/hermit.crab)\
**Post date:** [February 20, 2023, 8:18am UTC](https://forums.chaos.com/t/v-ray-distance-problem/101480/8 "2023-02-20T08:18:38Z")

</div>

@martin_weiss Check this [thread](https://forums.chaos.com/forum/v-ray-for-maya-forums/v-ray-for-maya-problems/1074692-vray-distnace-texture-gradiant-map). Note that the Ramp must be V Ramp. For circular - VRayDistanceTex’s Red channel should go to both U an V.

---

<div class="post-metadata">

**Author:** ![martin\_weiss](https://avatars.discourse-cdn.com/v4/letter/m/f17d59/32.png) [@martin\_weiss](https://forums.chaos.com/u/martin_weiss)\
**Post date:** [February 20, 2023, 4:52pm UTC](https://forums.chaos.com/t/v-ray-distance-problem/101480/9 "2023-02-20T16:52:56Z")

</div>

Thank you hermit.crab very much ! You made my day!

---

<div class="post-metadata">

**Author:** ![AEidom](https://avatars.discourse-cdn.com/v4/letter/a/59ef9b/32.png) [@AEidom](https://forums.chaos.com/u/AEidom)\
**Post date:** [February 23, 2023, 1:33pm UTC](https://forums.chaos.com/t/v-ray-distance-problem/101480/10 "2023-02-23T13:33:23Z")

</div>

i’m not sure if this is what you are looking for

 ![image.jpg](https://europe1.discourse-cdn.com/chaosprd/original/3X/f/d/fd5f3cae937efa5c4cab3d16c88205816f90c2b4.jpeg)

You can connect any bitmap to the distance texture channel

 ![image.png](https://europe1.discourse-cdn.com/chaosprd/original/3X/1/a/1aa1984fcc01113cbbaae9d153025a635da45fb6.png)

and control the distance amount with the file´s alpha gain channel value

 ![image.png](https://europe1.discourse-cdn.com/chaosprd/original/3X/7/8/788fa380227c34808ecef87de1d6a3060e8c7781.png)​​​

---

<div class="post-metadata">

**Author:** ![damaggio](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/damaggio/32/9438_2.png) [@damaggio](https://forums.chaos.com/u/damaggio)\
**Post date:** [February 23, 2023, 2:54pm UTC](https://forums.chaos.com/t/v-ray-distance-problem/101480/11 "2023-02-23T14:54:56Z")

</div>

Thanks Aleks, that was a very helpful scene file.Perhaps the docs can explain better in the future

---

<div class="post-metadata">

**Author:** ![hermit.crab](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/hermit.crab/32/46825_2.png) [@hermit.crab](https://forums.chaos.com/u/hermit.crab)\
**Post date:** [February 24, 2023, 8:25am UTC](https://forums.chaos.com/t/v-ray-distance-problem/101480/12 "2023-02-24T08:25:03Z")

</div>

> [@damaggio](#):
>
> Thanks Aleks, that was a very helpful scene file.Perhaps the docs can explain better in the future

Yes, we’ve already [added](https://docs.chaos.com/display/VMAya/VRayDistanceTex)info about it.
