Fade out / smooth shadow terminator ?

Use this forum for general user support and related questions.
Forum rules
Please upload a testscene that allows developers to reproduce the problem, and attach some images.
Post Reply
Basti
Posts: 8
Joined: Tue May 01, 2018 10:09 pm
Location: Germany

Fade out / smooth shadow terminator ?

Post by Basti »

Happy new year everyone :D

I want to know if its possible to blur or make the transition from shadow to lit area (i guess its called the shadow terminator ? ) more smooth, without changing anything in the scene(e.g. lights) except the shader.

Image

I know that luxcore has diffuse roughness, but that produces not the desired effect.

On this forum i found a couple of example comparisons by the user (Fluss) :
https://corona-renderer.com/forum/index ... #msg120362

Every renderer there behaves the same, which is probably physically correct, but the look i am after can be found in this image :
https://corona-renderer.com/forum/index ... 9194;image

The top half has a harsh line between shadow and lit area (meh), the bottom half has this nice soft falloff (great).


On another forum i have found a user (kosso_olli), who made a comparison between vrayrt and fstorm:

Fstorm
https://forums.chaosgroup.com/filedata/ ... 1471338786

VrayRT:
https://forums.chaosgroup.com/filedata/ ... 1471338796

Due to the nice soft falloff the fstorm image gains alot of depth, see the cushion part at the bedhead or the pillow in front.
In constrast the vray rendering looks pretty flat.


My guess is that this behaviour isn't physically correct, but is it possible to emulate it with some clever shader node setup or normal map trickery ?

Does somebody have any hints or ideas regarding this ?

Thanks in advance ;)
Attachments
example_002.png
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Fade out / smooth shadow terminator ?

Post by Dade »

Basti wrote: Wed Jan 01, 2020 11:02 pm My guess is that this behaviour isn't physically correct, but is it possible to emulate it with some clever shader node setup or normal map trickery ?
It is really more a light source problem than a material one. You get this kind of rendering when using a point light source:

point.jpg

It is a quite "unnatural" type of light source and, shadow terminator problem aside, it doesn't look realistic. Just use radius > 0.0 and it will start to look a lot better:

sphere.jpg
Support LuxCoreRender project with salts and bounties
Basti
Posts: 8
Joined: Tue May 01, 2018 10:09 pm
Location: Germany

Re: Fade out / smooth shadow terminator ?

Post by Basti »

Thank you Dade for the fast reply,

but I guess i haven't expressed myself well, i know how to achieve that look with a point light, that's how i made the example in my first post.

The sphere was also just an example, in an actual scene you have alot of different light sources, but i want that look on every surface regardless of the light source. Like in the bedroom scene images, which uses a hdri.

Fstorm ( with smooth falloff, creates a nice depth )
https://forums.chaosgroup.com/filedata/ ... 1471338786

VrayRT: ( without smooth falloff, in comparison to fstorm looks flat )
https://forums.chaosgroup.com/filedata/ ... 1471338796

Since i can't change the lights, nor the geometry i can only make adjustments to the shaders to get the desired effect.
But i guess a user cannot change the shadow terminator with a simple "normal map" trickery or other means?
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Fade out / smooth shadow terminator ?

Post by Dade »

I understand the problem but don't think there is currently a way to work around without writing some additional code. RoughMatte material is somewhat intended to address your problem but it is useless if you use something like a point light (the sharp transition between light and shadow will be still there because it is something coming from the light source, not the material).

Your request is also "qualitative" and a bit subjective (i.e. the VrayRT output looks better than Fstorm one to me). I have the feeling that your problem may be solved with some image post processing :?: May be adjusting the color ramp :?:
Support LuxCoreRender project with salts and bounties
User avatar
Sharlybg
Donor
Donor
Posts: 3101
Joined: Mon Dec 04, 2017 10:11 pm
Location: Ivory Coast

Re: Fade out / smooth shadow terminator ?

Post by Sharlybg »

our request is also "qualitative" and a bit subjective (i.e. the VrayRT output looks better than Fstorm one to me).
i've the same feeling.
Support LuxCoreRender project with salts and bounties

Portfolio : https://www.behance.net/DRAVIA
User avatar
lacilaci
Donor
Donor
Posts: 1969
Joined: Fri May 04, 2018 5:16 am

Re: Fade out / smooth shadow terminator ?

Post by lacilaci »

Dade wrote: Thu Jan 02, 2020 11:39 pm I understand the problem but don't think there is currently a way to work around without writing some additional code. RoughMatte material is somewhat intended to address your problem but it is useless if you use something like a point light (the sharp transition between light and shadow will be still there because it is something coming from the light source, not the material).

Your request is also "qualitative" and a bit subjective (i.e. the VrayRT output looks better than Fstorm one to me). I have the feeling that your problem may be solved with some image post processing :?: May be adjusting the color ramp :?:
Yes, the flat look on the vray comparison renders is definitely easily fixable in post.
However!

Fstorm is the best when it comes to postproces, and I think that even if you disable tonemapping/postprocesing in vfb, fstorm still does some sort of tonemapping and stuff anyways. It's like magic, tonemapping and "color science" you can get straight in fstorm framebuffer is just miles ahead of everybody else. And I think that's what's happening in the comparison, fstorm does some adjustments with tonemapping rather shading itsels.
Maybe I'm worng though, i'm no specialist on the matter...

Anyway, I hope some day a dev. joines luxcore and reproduces something like fstorm's postprocessing so that we don't have to deal with blender's terrible ideas of tonemapping or, someone fixes blender's color insanity. Right now the best you can do is get a flat looking output and "fix" it in post.
Post Reply