This site is being deprecated.

Please see the official X‑Plane Support page for help.

+1 vote
asked by (19 points)
Hello support team,

I have a question on the dsf file. What are the X-normals and Z-normals used for? only for the projection of the structure on the surface (so for the TERRAIN_DEF) or for the creation of the surface itself (for the PATCHs)?

Is it possible to use a "default value" for all normals?

Thank you very much!

1 Answer

+1 vote
answered by (148 points)
DSF can operate in two modes:

- When DSF is operating without raster DEM information, the normals from the DSF mesh patches become the normal vectors in the 3-d triangle mesh drawn in X-Plane, used for lighting calculations; they need to be provided to get appropriate terrain lighting queues.  They are not used for structure surface projection - that is done strictly with the actual 3 vertices for each triangle.

(Because the normals are "per vertex" and not "per triangle", they are rather useless for projection - it is expected that they may be blends of neighboring triangles.)

- When DSF is operating with a raster DEM, then like the elevation of a point and the normal are computed from the raster layer; in this case the elevation must be the flag value -32768.0 and normals should be set to 0 to improve DSF compression.

In the raster case, if the elevation is not -32768.0, then that indicates the elevation is still used, but the normals come from the DEM.  The goal of this is to allow -exact- edge matching at water bodies.
...