Scenes you draw with the GameMaker: Studio functions may look rather flat because there is no lighting to give them realism and life, meaning that the colour of the faces is equal all over, independent of their orientation or position. Therefore, to create more realistically looking scenes you must enable lighting and place lights at the correct places within the 3D world, and this section outlines the functions available to help you achieve that:
It is worth noting that all targets except Android
use smooth shading for lighting, but on Android this is hard
shading. On the Windows platform this can be changed using
the d3d_set_shading() function, but for all other
platforms you should use a shader to create different lighting
types.
The way an object reflects light depends on the angle between the light direction and the normal of the surface, that is, the vector pointing away from the surface. Hence, to create lit objects you need not only provide the position of the vertices but also their normals. For this four additional functions are available to define the vertices of primitives (for the basic shapes that you can draw the normals are automatically set correctly):
The above functions are used to define a primitive in the same
was as that outlined in the section 3D Drawing.