mimic depth map

Hi, I’m trying to create the effect of a kinect-style depth map on a piece of geometry, with the ability to control the colour of regions depending on their height (Y axis). My thought was to use the Point sop and $TY but I’m a little stuck. Can anyone suggest a technique for achieving this? Ideally I’d be able to control colours and ranges using a ramp but maybe I’m approaching it in a bad way, or it’s more complex than I hoped. Thanks.
pointheight.toe (6.24 KB)

If you’re looking for a node centric way to approach this I’d suggest giving this a look over:

matthewragan.com/2014/04/27/ins … hdesigner/

That apprach works well, but you’ll bottle neck on your CPU at some point - especially if you want to re-calculate your normals. If you’re working with low resolution meshes that’s probably a fine approach.

If you’re after a faster operation, you might want to instead think of doing this as a vertex operation with a GLSL material. We covered a good bit of this approach at a workshop here in SF:

matthewragan.com/make-some-nois … hdesigner/

Hope that gives you a nudge in the right direction.

Wow there’s a lot of depth in those links! GLSL looks scary but this might be a good entry point. Thanks for this.