Geometry to height map (like ZBuffer) in Grasshopper

Hi all, I’m trying to automate a Rhino workflow in Grasshopper. I want to produce greyscale (or RGB) height maps from different angles of a geometry, post process these in an image toolchain and then turn them back into 3d geometry. In Rhino I use ShowzBuffer to render the height map, save that as image and then import the altered image using Heightfield. The second part is easily done with ImageSampler (any better alternatives with customisable size inputs?) but the first part, how can I generate a height map from geometry? Google turns up very little. Is Grasshopper capable for more render type processes or should I better implement is Blender nodes?

I’m not familiar with Grasshopper … does it allow you to access the same controls as the Rhino renderer? If so, then you can save the Distance channel.

Thanks @cdordoni, the Distance Channel was the only useful thing that turned up when googling for a solution. It definitely gives some better control than ZBuffer + screen capture. But Grasshopper is pretty limited in regards to accessing render related stuff. There are some new components in R8. I’m the opposite of you, only use GH and very little Rhino so the whole render setup is a bit new for me and not as straightforward as I’m used to in other render apps. If I can control the camera view from GH that would already be one step. There’s a model view component that I can use to define a view but it is not really documented anywhere as far as I can see. I have a view setup in GH and I can push that to Rhino so far.

Hello @Unfold, I don’t know if this might be what you are looking for, but I just pushed version 2.2.14 of froGH, which includes a new option to save the Z-buffer channel as a separate file in the ViewCaptureToFile component. Check the Example files if you are interested (06_froGH_View-Display.gh).


1 Like