# gradient map problem

**URL:** <https://forums.chaos.com/t/gradient-map-problem/39238>\
**Category:** Off-topic\
**Created:** [November 2, 2011, 6:50pm UTC](https://forums.chaos.com/t/gradient-map-problem/39238 "2011-11-02T18:50:22Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![Da\_elf](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/da_elf/32/44038_2.png) [@Da\_elf](https://forums.chaos.com/u/Da_elf)\
**Post date:** [November 2, 2011, 6:50pm UTC](https://forums.chaos.com/t/gradient-map-problem/39238/1 "2011-11-02T18:50:22Z")

</div>

I usually use a trick with normal max lighting to use a gradient map with the gradient type set to lighting as a mask between lit and shaded area. however when using vray sun for lighting the lighting is so bright that this method doesnt work. anyone know any other tricks i could use on this?

---

<div class="post-metadata">

**Author:** ![MoonDoggie](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/moondoggie/32/68517_2.png) [@MoonDoggie](https://forums.chaos.com/u/MoonDoggie)\
**Post date:** [November 2, 2011, 7:19pm UTC](https://forums.chaos.com/t/gradient-map-problem/39238/2 "2011-11-02T19:19:46Z")

</div>

Could you use Falloff textures on the objects set to “Shadow / Light”?

I’m not quick sure what you’re looking for though 🙂

---

<div class="post-metadata">

**Author:** ![Da\_elf](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/da_elf/32/44038_2.png) [@Da\_elf](https://forums.chaos.com/u/Da_elf)\
**Post date:** [November 2, 2011, 7:44pm UTC](https://forums.chaos.com/t/gradient-map-problem/39238/3 "2011-11-02T19:44:39Z")

</div>

falloff is the same as gradient ramp except you get more control over gradient ramp. max uses those assuming that dark = 0 brightness and bright = 255. but with vray sun in the picture dark = reeeeally bright by max standards, and bright = eeeeven brighter

---

<div class="post-metadata">

**Author:** ![Da\_elf](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/da_elf/32/44038_2.png) [@Da\_elf](https://forums.chaos.com/u/Da_elf)\
**Post date:** [November 3, 2011, 4:48pm UTC](https://forums.chaos.com/t/gradient-map-problem/39238/4 "2011-11-03T16:48:20Z")

</div>

ok. how about max script. is there a way to have a maxscript act like a blend material that can check a pixel on an object. see how bright the lighting on it is and if the lighting falls between 1 value and another value blend two other materials together. anything below a value renders 1 material fully and anything above the other value renders the other material fully.  
maybe you can supply a base material that it will use when checking the lighting

---

<div class="post-metadata">

**Author:** ![MoonDoggie](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/moondoggie/32/68517_2.png) [@MoonDoggie](https://forums.chaos.com/u/MoonDoggie)\
**Post date:** [November 3, 2011, 5:11pm UTC](https://forums.chaos.com/t/gradient-map-problem/39238/5 "2011-11-03T17:11:42Z")

</div>

Not that I’m aware of. Not sure how much you can really do with scripted materials. There has to be a way to do this though. I wish there were “If/then” checks within the slate material editor.

---

<div class="post-metadata">

**Author:** ![Da\_elf](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/da_elf/32/44038_2.png) [@Da\_elf](https://forums.chaos.com/u/Da_elf)\
**Post date:** [November 4, 2011, 12:01pm UTC](https://forums.chaos.com/t/gradient-map-problem/39238/6 "2011-11-04T12:01:02Z")

</div>

im sure there has to be a way for max to analyse the brightness of a pixel and apply a material based on that. when you right click in vfb it can give you color info on the image so why not be able to use that info while rendering

---

<div class="post-metadata">

**Author:** ![MoonDoggie](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/moondoggie/32/68517_2.png) [@MoonDoggie](https://forums.chaos.com/u/MoonDoggie)\
**Post date:** [November 4, 2011, 6:36pm UTC](https://forums.chaos.com/t/gradient-map-problem/39238/7 "2011-11-04T18:36:14Z")

</div>

Absolutely, but that would be a plugin material. You’d have to use the SDK kit for that. Maybe someone else could comment on the plausibility of creating that plugin material as I have no experience with the SDK.

---

<div class="post-metadata">

**Author:** ![Da\_elf](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/da_elf/32/44038_2.png) [@Da\_elf](https://forums.chaos.com/u/Da_elf)\
**Post date:** [November 4, 2011, 6:42pm UTC](https://forums.chaos.com/t/gradient-map-problem/39238/8 "2011-11-04T18:42:04Z")

</div>

bummer. why did gradient ramp have to be so limited

---

<div class="post-metadata">

**Author:** ![jonahhawk](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/jonahhawk/32/235074_2.png) [@jonahhawk](https://forums.chaos.com/u/jonahhawk)\
**Post date:** [November 7, 2011, 4:38am UTC](https://forums.chaos.com/t/gradient-map-problem/39238/9 "2011-11-07T04:38:17Z")

</div>

BerconGradient has a lighting option. I havent tested it with VRay sun though.

[http://www.ylilammi.com/BerconMaps.shtml](http://www.ylilammi.com/BerconMaps.shtml)

---

<div class="post-metadata">

**Author:** ![themaxxer](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/themaxxer/32/49780_2.png) [@themaxxer](https://forums.chaos.com/u/themaxxer)\
**Post date:** [November 8, 2011, 6:28pm UTC](https://forums.chaos.com/t/gradient-map-problem/39238/10 "2011-11-08T18:28:42Z")

</div>

hm, I knew the light/shadow option is not working properly.  
does it work with other vraylights?

best regards  
themaxxer

---

<div class="post-metadata">

**Author:** ![Da\_elf](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/da_elf/32/44038_2.png) [@Da\_elf](https://forums.chaos.com/u/Da_elf)\
**Post date:** [November 8, 2011, 6:33pm UTC](https://forums.chaos.com/t/gradient-map-problem/39238/11 "2011-11-08T18:33:46Z")

</div>

it would work with any light thats using normal 3dsmax light levels. but the second you start using real lighting levels then that light is way too bright for the normal gradient. havent tried bercon gradient as yet

---

<div class="post-metadata">

**Author:** ![beestee](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/beestee/32/69430_2.png) [@beestee](https://forums.chaos.com/u/beestee)\
**Post date:** [November 8, 2011, 9:59pm UTC](https://forums.chaos.com/t/gradient-map-problem/39238/12 "2011-11-08T21:59:22Z")

</div>

> [@On another topic](https://forums.chaos.com/t/36680/15):
>
> falloff is the same as gradient ramp except you get more control over gradient ramp. max uses those assuming that dark = 0 brightness and bright = 255. but with vray sun in the picture dark = reeeeally bright by max standards, and bright = eeeeven brighter

Not necessarily. The VRaySun intensity setting allows one to control this scale. For me with this multiplier set at 0.01 - 0.015, it essentially puts the VRaySun in line with max’s default scale:

Just remember to turn off exposure in your physical cameras.

This also allows you to use the ink n paint material if you so wish.

 ![gradient ramp with vray sun.jpg](https://europe1.discourse-cdn.com/chaosprd/original/3X/4/8/48836e5db3f2bdac9db3b93823d4e9f5b1151fd0.jpeg)  
 ![settings.PNG](https://europe1.discourse-cdn.com/chaosprd/original/3X/b/c/bc6d22b44304abe457b6f3d23f7f0c9a5b265b1e.png)

---

<div class="post-metadata">

**Author:** ![themaxxer](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/themaxxer/32/49780_2.png) [@themaxxer](https://forums.chaos.com/u/themaxxer)\
**Post date:** [November 9, 2011, 8:37am UTC](https://forums.chaos.com/t/gradient-map-problem/39238/13 "2011-11-09T08:37:03Z")

</div>

wow, great! didn’t thought about that.

so it would be great if max would understand more than 256 levels… would it be possible theoretically?

best regards  
themaxxer

---

<div class="post-metadata">

**Author:** ![Da\_elf](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/da_elf/32/44038_2.png) [@Da\_elf](https://forums.chaos.com/u/Da_elf)\
**Post date:** [November 9, 2011, 1:28pm UTC](https://forums.chaos.com/t/gradient-map-problem/39238/14 "2011-11-09T13:28:33Z")

</div>

@beestee i know what the vray sun multiplier does. however if you do that your not getting a realistic sun and might as well use a max direct light. i can get the gradient ramp to work perfectly when using a direct light now i need to figure out how to use a vray sun at normal multiplier. got my fingers crossed for bercon maps

---

<div class="post-metadata">

**Author:** ![instinct](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/instinct/32/74489_2.png) [@instinct](https://forums.chaos.com/u/instinct)\
**Post date:** [November 9, 2011, 2:13pm UTC](https://forums.chaos.com/t/gradient-map-problem/39238/15 "2011-11-09T14:13:09Z")

</div>

> [@themaxxer](#):
>
> wow, great! didn’t thought about that.
> 
> so it would be great if max would understand more than 256 levels… would it be possible theoretically?
> 
> best regards  
> themaxxer

It does for most/many things. It is a bunch of maps and other features that do not. You can of course have maps that generate and/or use arbitrary float data.

Regards,  
Thorsten

---

<div class="post-metadata">

**Author:** ![beestee](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/beestee/32/69430_2.png) [@beestee](https://forums.chaos.com/u/beestee)\
**Post date:** [November 9, 2011, 2:55pm UTC](https://forums.chaos.com/t/gradient-map-problem/39238/16 "2011-11-09T14:55:32Z")

</div>

I am sorry if my response seemed offensive, but it seemed to me that you were stating that the VRaySun is always too intense to utilize max’s shadow/light tools that depend on the same scale. To me, it is all simulation and I will use whatever I have to in order to accomplish my goal. Almost always for me, this goal is a visually pleasing end result, not a physically metered end result. The **visual result** of the VRaySun and VRaySky **is the same** at a lower intensity unexposed as an exposed result at full intensity.

Rather than fooling with f-stops and film isos, I prefer to fool with the intensity of the sun. It is obviously not possible to do this in reality…but we do have that sort of control in Max. I am certain if photographers could control the sun as opposed to their camera settings then they would jump at the opportunity 😄

But I do understand that there are some situations where physically accurate lighting is necessary, such as if you must utilize manufacturer IES files or perform an energy analysis. I hope you find something that works for you 🙂

---

<div class="post-metadata">

**Author:** ![Da\_elf](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/da_elf/32/44038_2.png) [@Da\_elf](https://forums.chaos.com/u/Da_elf)\
**Post date:** [November 9, 2011, 2:56pm UTC](https://forums.chaos.com/t/gradient-map-problem/39238/17 "2011-11-09T14:56:02Z")

</div>

im hoping bercon gradient would do that. if you can use a max min range in float that will be awesome. cant test untill im finished this project
