Hello I'm currently trying to flatten a mesh in the Z axis, my intention is that ive made a contour map in 3D, where the Z vertice values represent the values on the contour map. But I want to turn it 2D (flatten it) whilst preserving those Z values as the Z values are used for shader colouring later on. I've tried scaling it down to a small factor then multiplying out when I used a shader to colour it however it caused some Z fighting issues. I've also tried dividing the mesh down to a minute value with animation nodes to multiple out later for mesh colouring however with this way I cant seen to get the mesh flat enough, theres always a small bump.

Does anyone have any suggestion to a better way around this.

  • 4
    $\begingroup$ Sorry, I'm having difficulty picturing what your original "contour map" mesh looks like - any chance you could post a screenshot? $\endgroup$ Commented Jul 28, 2021 at 18:41
  • $\begingroup$ ...or provide your blend file so we can check it out $\endgroup$
    – Chris
    Commented Jul 29, 2021 at 9:38
  • $\begingroup$ Go into edit mode for your mesh object. Select all vertices in vertex selection mode. Then scale the z-axis to 0. You may want to delete faces and/or edges. $\endgroup$
    – stav_nan
    Commented Aug 3, 2021 at 20:19

1 Answer 1


Just capture the position of each vertex with the node Transfer Attribute and separate X/Y/Z, then combine only the X and Y axis, and set the positions with the node Set Position. With this you have discarded Z.

The value for the Z-axis, on the other hand, you simply feed into a new socket of the node Group Output, give this value a name in the Modifier Properties.

With this name you can then capture this value in your shader nodes with the node Attribute and convert it into a color.

enter image description here


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .