Chaos Corona Forum

Chaos Corona for Cinema 4D => [C4D] Bug Reporting => Topic started by: prince_jr on 2019-12-16, 18:57:11

Title: Ambient Occlusion
Post by: prince_jr on 2019-12-16, 18:57:11
ambient occlusion is not working properly or at all, i guess. it only creates a small amount on the edge. no matter how high i set the "max. distance".
i did everything as it is supposed to do (helpdesk and tutorials)

does anybody have an idea or similar problems?


system: mac pro 5.1 (mid 2010, 2x 3.46ghz-6 core), 128gb ram
software: macos 10.13.6, c4d r21, corona renderer 5 for c4d
Title: Re: Ambient Occlusion
Post by: houska on 2019-12-16, 19:05:44
Hi and thanks for reporting! This should indeed be changed. The same issue appears for example with the glossiness value/shader in reflection channel. We will definitely have a look at it!

Edit: Just to clarify - the reason it's not working as you would expect is because you have a max distance shader set. In that case only the shader is used and it interpolates between 0 cm and 1 cm. If you clear the shader, the fixed value of 50 cm will suddenly kick in. What it should probably do would be always multiply the shader and the value.

(Internal ID=435332414)
Title: Re: Ambient Occlusion
Post by: prince_jr on 2019-12-18, 18:57:13
thanks for answering.
in the meantime i was able to get a simple gradient (no shader, only value "max. distance").
but i still didn't figure it out how to use ambient occlusion by shader (noise etc.), as it should produce a shaped gradient (by noise, bitmap etc.)
Title: Re: Ambient Occlusion
Post by: Beanzvision on 2019-12-19, 12:04:40
thanks for answering.
in the meantime i was able to get a simple gradient (no shader, only value "max. distance").
but i still didn't figure it out how to use ambient occlusion by shader (noise etc.), as it should produce a shaped gradient (by noise, bitmap etc.)

Is this what you are trying to do? I have attached a sample material for you to explore! :)

(https://forum.corona-renderer.com/index.php?action=dlattach;topic=27339.0;attach=117222;image)
Title: Re: Ambient Occlusion
Post by: prince_jr on 2019-12-20, 23:27:37
wow, thank you very much for your help and the example! that's exactly what i was looking for. :o)

if i may ask one last question...
is it possible to have the ao only on the bottom or top of an object?
already tried it with a gradient as a layer mask, but it wasn't satisfying enough.

i attached the c4d-file, wherein i tried to accomplish it.
Title: Re: Ambient Occlusion
Post by: Beanzvision on 2020-01-08, 16:27:07
I would have suggested the same thing by using a layer mask etc. I tweaked your scene a little and change the AO calculations from "inside" to "outside". I hope that helps :)

(https://forum.corona-renderer.com/index.php?action=dlattach;topic=27339.0;attach=117748;image)
Title: Re: Ambient Occlusion
Post by: prince_jr on 2020-01-09, 22:40:57
thank you @beanzvision for uploading a sample, how grime can be added at the bottom, without affecting the vertical edges. unfortunately i wasn't able to put it on top (top to bottom, without vertical edges). "outside" mode always puts the grime at the bottom not on top. any idea? ;o)

i also attached some samples of the private project i'm working on. the materials (stone, concrete) are made as a mix of a base shader (with ao) and a stacked dirt shader (controlled by noise & gradient). i'm very happy with the result so far!
 
thanks for all your support. i really appreciate! corona renderer and its team is amazing!
Title: Re: Ambient Occlusion
Post by: prince_jr on 2020-01-19, 10:26:42
@beanzvision would be nice if you can tell, how to put grime on the upper edge (top to bottom) as ask in the last post. thanks a lot!
Title: Re: Ambient Occlusion
Post by: Beanzvision on 2020-01-20, 17:28:01
@beanzvision would be nice if you can tell, how to put grime on the upper edge (top to bottom) as ask in the last post. thanks a lot!
At present this is a bit tricky to do. However, I would suggest a workaround by using a secondary shader and stacking that on your object. I have attached an updated scene for you to explore. I hope that helps.

(https://forum.corona-renderer.com/index.php?action=dlattach;topic=27339.0;attach=118248;image)
Title: Re: Ambient Occlusion
Post by: lollolo on 2020-01-20, 17:43:34
@beanzvision I thought that material stacking is only possible with Corona Layer Material..
Was it always possible in the past?
But very cool!

I learned something new about Corona today :)
Title: Re: Ambient Occlusion
Post by: TomG on 2020-01-20, 18:21:46
Material stacking was added in Corona Renderer 4 (https://corona-renderer.com/blog/corona-renderer-4-for-cinema-4d-released/)