...
The z of the grid will be get from the triangle where the grid corner is projected (in 2D), or from a close node.
If the checkbox "Far points set nodata" is set, then grid points outside the triangles will be set to a special nodata value (-9999 usually) , and won't generate grid quadrilaterals