Hi,
I am trying to make shadows more blurred, in particular to soften progressively - as they fall further from the object.
I see that it makes renders look much more realistic.
I tried using a "Decay filter" or a "light filter" with a "ambient occlusion light filter",
but it just lightened or darkened the scene without making any falloff in the shade.
I would like to know, is it possible to create shadow softening with a hdri skydome? It seems to me that an extra large sun would increase the shadow blur.
In addition, is there a way to set the contrast between the light and shadow (like Gamma in vray)?
Thank you
Solved! Go to Solution.
Solved by madsd. Go to Solution.
wire hdri to a color correct map (osl or arnold) for tweaking gamma and
assign this to skydome.
I don't think you can intervent how an hdri emmit light+shadows, otherwise
use an arnold direct light+arnold filters to get the effect you want...
You can blur the map in an OSL Bitmaplook up node, but a bit of code addition is neeed, and Arnold needs to have the Auto mip map flag enabled.
This way you can control the amount of blur, and thus how soft or strong the shadows are.
Do note you cannot go the other way around, make a very soft image sharp. But thats also not what you want.
I can cook up some code for it and return in a bit with a custom shader.
This is the actual shader.
Download it, and overwrite the one in maxroot/OSL/ folder.
Or just open a random OSL node in max, delete all code, and copy paste this into it and press f7.
You then need to adjust the blur value on the map in the bottom shown above, and dont forget to enable Auto-mipmapping in the render panel.
https://github.com/gkmotu/OSL-Shaders/blob/master/HDRIEnviron_blur.osl
Hi Mads,
Thank you so much! That is very helpful!
I've been struggling with this issue for a few days.
I'm trying to carry out your instructions,
I can't manage to overwrite the OSL map in the folder so I copied and pasted your code, then pressed F7,
But for some reason it does not look the same as the OSL map in your image above.
And when I tried to set the blur value, the background became blurred instead of the shadow.
What am I doing wrong?
Right, the .ui file is missing.
Technically it does not mean anything, your ui just resorts to an autoUI.
If you want to have the ui, go into the maxroot/OSL and find the .ui file, copy it to your root/plugins/OSL folder and store the osl file there as well. The same name is needed on both files. Restart max and you should have 2 environment maps in the list, original and this custom one.
For the seperation of the background and the environment, use an environment swither, there is an OSL one, and an Arnold render panel one.
Really cool Mads Drøschler !
Some template & mtd file for Maya, Houdini, and Cinema4D
#Maya
#Houdini
#Cinema4D
Updated the git, zip lies next to shader.
I put a general statement in top of ReadME that you typically do the 3 other host UIs.
I copied the UI file and OSL and restarted max, and still don't see 2 environment maps in the list.
Why is it not working?
Sure, the UI just wont be original. Its doing an auto UI, ignore that part, it should work.
I can see on your screenshot that the blur = 0.02 thats what I added, so you have loaded the shader.
You need to remember to enable "auto mipmapping" in the render settings as I explained, else it wont work with Arnold.
It wont work in the viewport.
Or maybe, zap introduced something for 2021 OSL which isnt supported in 2020. I can see things in the code I think that are relatively new. So my guess is something may break if you use 2020.
The shader is part of 2021 anyways, try download a trial and see if you can get it going.
Else you have some workflow misses, like the mipmap thing, hard to say.
Your right!
The auto mipmap turned off, probably as I restarted max.
I still can't see any noticeable change in shadows, but I do see a change in the material preview.
From what I understand, the next step is what you wrote for me-
For the seperation of the background and the environment, use an environment swither, there is an OSL one, and an Arnold render panel one.
I'm sorry, I didn't understand what to look for, and didn't find any similar map.
Do you know the exact name of the map?
Its a map that ships with 2021 as well.
Get the 2021 trial latest point release, steal the shader from that install and use it in 2020 and see if it works.
I copied the code from max 2021 environment/background switcher to a max 2020 OSL map,
and didn't see any change.
I also tried rendering the scene in max 2021 and still no change?