# Corona AO radius with bitmap

**URL:** <https://forums.chaos.com/t/corona-ao-radius-with-bitmap/137396>\
**Category:** Issues\
**Created:** [June 20, 2017, 2:02pm UTC](https://forums.chaos.com/t/corona-ao-radius-with-bitmap/137396 "2017-06-20T14:02:03Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![illbru](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/illbru/32/235147_2.png) [@illbru](https://forums.chaos.com/u/illbru)\
**Post date:** [June 20, 2017, 2:02pm UTC](https://forums.chaos.com/t/corona-ao-radius-with-bitmap/137396/1 "2017-06-20T14:02:03Z")

</div>

hi, How does “max distance texture” in Ao shader works? I want to use a texture as a mask for occluded/unoccluded colors but i can’t define the radius once i use a texture.  
Thank you

---

<div class="post-metadata">

**Author:** ![houska](https://avatars.discourse-cdn.com/v4/letter/h/3ec8ea/32.png) [@houska](https://forums.chaos.com/u/houska)\
**Post date:** [June 21, 2017, 9:24am UTC](https://forums.chaos.com/t/corona-ao-radius-with-bitmap/137396/2 "2017-06-21T09:24:13Z")

</div>

Hi, I tried changing max distance while Occluded and Unoccluded textures were specified and everything worked fine. The AO shader samples the surroundings of every point on the geometry by casting rays. The max distance parameter then specifies the maximum length of such a ray.

Could you maybe show us on a picture what is wrong?

---

<div class="post-metadata">

**Author:** ![illbru](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/illbru/32/235147_2.png) [@illbru](https://forums.chaos.com/u/illbru)\
**Post date:** [June 21, 2017, 9:33am UTC](https://forums.chaos.com/t/corona-ao-radius-with-bitmap/137396/3 "2017-06-21T09:33:51Z")

</div>

I am loading a texture in the max distance texture slot, not in the occluded or unoccluded texture slot.  
What i am trying toi achieve is to use a texture to mask occluded and unoccluded color in order to avoid that plain gradient transition between the 2 colors.  
I used to do this in Vray, i used a texture in dirt map but the i could still use the radius value.  
Maybe my workflow in corona is wrong.

---

<div class="post-metadata">

**Author:** ![Behrendt\_1](https://avatars.discourse-cdn.com/v4/letter/b/71e660/32.png) [@Behrendt\_1](https://forums.chaos.com/u/Behrendt_1)\
**Post date:** [June 21, 2017, 9:44am UTC](https://forums.chaos.com/t/corona-ao-radius-with-bitmap/137396/4 "2017-06-21T09:44:26Z")

</div>

It seems to work with floating point values. If you load a C4D-Color shader into the slot you can compare the results. 100% White gives you 1cm radius, 200% white gives your 2cm radius, and so on…

---

<div class="post-metadata">

**Author:** ![houska](https://avatars.discourse-cdn.com/v4/letter/h/3ec8ea/32.png) [@houska](https://forums.chaos.com/u/houska)\
**Post date:** [June 21, 2017, 11:12am UTC](https://forums.chaos.com/t/corona-ao-radius-with-bitmap/137396/5 "2017-06-21T11:12:29Z")

</div>

My appologies, now I understand what you were trying to achieve. Yes, it seems like a bug indeed. I will move it into the bugreports section.

Thank you!

---

<div class="post-metadata">

**Author:** ![illbru](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/illbru/32/235147_2.png) [@illbru](https://forums.chaos.com/u/illbru)\
**Post date:** [June 22, 2017, 8:53am UTC](https://forums.chaos.com/t/corona-ao-radius-with-bitmap/137396/6 "2017-06-22T08:53:11Z")

</div>

Great! Thank you!
