question

Dina A avatar image
Dina A asked ·

How to blur shadows - skydome with hdri map maxtoA?

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

skydomeshadowfilters
1592772554482.png (185.5 KiB)
1 comment
10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

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...

0 Likes 0 · ·
Mads Drøschler avatar image
Mads Drøschler answered ·

Posting a new reply instead of the 12 reply deep stack.

I can do this in 2021, no problem.
Just make sure to wire it up correctly and it will work just fine.


The environment switcher has 2 maps, 1 for background the other for light, the light one can blur, while having a sharp background plate.

Here it works flawless, let me know if you are still stuck then we need to look into producing some more explicit walkthrough.



qweqwe.png (1.2 MiB)
6 comments Share
10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Great thanks,

I'm Looking forward for the maps!

0 Likes 0 · ·

I use the map I send over and the environment switcher from 2021.

since you have 2021, can you try this? You have the file needed.
If works, then move 1 version backsaving to 2020 and try there.

0 Likes 0 · ·

I actually tried that already and it didn't do anything,

Does it work by you?

What amount do you set in the blur section?

0 Likes 0 · ·

blurlightarnoldOSL.zip


Attached 2021 project setup and working.

1 Like 1 · ·

It actually works! it does blur the shadows just as I wanted,

Thanks so much! that's amazing...


I copied the code into 3ds max 2020 and it also works, and looks natural and soft.

Thank you so much for all your efforts, and patients!!!!

1 Like 1 · ·
1593979045173.png (831.7 KiB)
1593980743482.png (519.1 KiB)

Super :)

0 Likes 0 · ·
Mads Drøschler avatar image
Mads Drøschler answered ·

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.

12 comments Share
10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

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?


0 Likes 0 · ·
1592858049488.png (108.2 KiB)

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.

0 Likes 0 · ·
Dina A avatar image Dina A Mads Drøschler ·

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?

0 Likes 0 · ·
1593019423160.png (17.9 KiB)
1593019486479.png (96.0 KiB)
Show more comments
Mads Drøschler avatar image
Mads Drøschler answered ·



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




qweqweqwe.gif (1.8 MiB)
qweqweqwe.png (1.3 MiB)
2 comments Share
10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Mads my friend, I used to raise up hdri's gamma for bluring

shadows, this isn't the right way to do?

0 Likes 0 · ·

Gaussian blur is the most robust failsafe way, when you have either super bright tiny spots or "whatever"

2 Likes 2 · ·
rachid Hadj Abderrahmane avatar image
rachid Hadj Abderrahmane answered ·

Really cool Mads Drøschler !
Some template & mtd file for Maya, Houdini, and Cinema4D
#Maya

#Houdini

#Cinema4D


HDRIEnviron_blur.zip


1 comment Share
10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

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.

0 Likes 0 · ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Welcome to the Arnold Answers community.

This is the place for Arnold renderer users everywhere to ask and answer rendering questions, and share knowledge about using Arnold, Arnold plugins, workflows and developing tools with Arnold.

If you are a new user to Arnold Answers, please first check out our FAQ and User Guide for more information.

When posting questions, please be sure to select the appropriate Space for your Arnold plugin and include the plugin version you are using.

Please include images, scene and log files whenever possible as this helps the community answer your questions.

Instructions for generating full verbosity log files are available for MtoA, MaxtoA, C4DtoA, HtoA, KtoA, and Kick.

If you are looking for Arnold Documentation and Support please visit the Arnold Support site.

To try Arnold please visit the Arnold Trial page.

Bottom No panel present for this section.