I wanted to share a small collection of shaders that I recently put together into a single file. These shaders are a compilation of various versions I found online, contributed by talented individuals such as @stevebaer, @Mariusz_Hermansdorfe, and @jho. I’ve made some tweaks and modifications to them myself, and I’ve also created a few new ones with the help of chatgpt’s creative input.
Feel free to utilize these shaders in your projects, make adjustments according to your needs, and even contribute your own shaders to expand this collection. I’ll be adding more shaders in the upcoming days and weeks. I’ve found them to be more efficient in terms of execution speed compared to traditional methods.
To make use of these shaders, make sure you have the ‘ghgl’ (7.8.0) plugin installed via your package manager (Rhino 7)
glmaps_edit_crz_06.gh (119.8 KB)
added variable vector. If you need real-time camera update change python accordingly or use external plugin to get you camera dir vector
I case you didn’t know there is a ShowZBuffer command in rhino that toggles the display of a grayscale z-buffer bitmap with the same dimensions as the viewport.
is possible to export the toon shade as a render material? or bake the object with the material?
and the “showzbuffer” is like an AO of the object or what would you use it for?
Toon shading involves real-time lighting calculations, which don’t bake directly. You’d need to bake the visual effect into a texture map and apply that to the object. I am not sure if that can be done. I did see an example to export it as GLTF formats for web viewing
Regarding ShowZBuffer, it’s not like ambient occlusion (AO) directly. The Z-buffer visualizes depth information, showing how far or close objects are from the camera. You can use this data for post-processing effects, like depth-based shading or compositing. AO simulates the soft shadows from ambient light, while the Z-buffer is purely geometric depth. You could, however, use the Z-buffer in combination with AO for effects like depth of field or depth-based shading. I use for a fast way to visualize a heightmap, with either absolute or relative distance independent of camera