Ambient Occlusion mesh color

Is there a way how to color mesh by Ambient Occlusion in Grasshopper?

Thank you


Is this component from any plugin ?


That’s my question. In the picture it is a dummy component. Just to show what I am looking for. I guess it will need different inputs.

Actual occlusion, or just display z-buffer occlusion like the viewports do? One involves a shader, the other lots of mesh/ray intersections.

Or just something like that using Exposure? (8.8 KB)

what I understand z-buffer occlusion is a camera dependent, so when I will rotate viewport it will need to be recomputed. So actual occlusion would be way better for baking with mesh. I’m aware it will take a serious processor time.

Anyway, each of them would be helpful.

1 Like

I’ve logged it under RH-60017.

We passed 60k issues recently! Time to pull open some bubbly.


Looking forward for solution.

Hi I’m not sure why nobody mentions GH native Occlusion component…
(maybe because I don’t know what’s z-buffer occlusion?)
Caution!! very slow!! (20.2 KB)


High-res version (20mins to compute…)

1 Like

Attempted to incorporate shadow from a light source.

Caution! really slow! Consumes 10GB memory! (26.6 KB)


ran overnight.

1 Like

Better I do this with photoshop :wink::grin:.

Disclaimer: Just for fun

it was just a lazy weekend’s hobby!

This might also work for very particular cases. The approach is based on Mesh | Ray intersection and I’m sure the solution can be done in a way lot cleaner manner than what I have come up with :grinning: (20.3 KB)


Memory consumption was optimized. The Occlusion component has been replaced by a Python node which enabled parallel processing. Look at the self-shadowing on the bunny!

The parameters in the gh def is set to lower quality. Should run in most of the environment. (5.6 MB)

Baked mesh.
occlusion.3dm (8.3 MB)