Page 20/36
TGLCamera
You can think of a camera as a point in space where the scene is viewed from. Camera has
position, direction and up vectors same as other objects. You cam move and rotate camera around
the scene. Simpler and more useful method of orienting camera is to make it look at another object.
Assign the object to Target property. The camera will always point to that object wherever it
moves.
FieldOfView is a value that changes camera lenses. Lower values make the angle
overlooking the scene wider and higher values zoom to more focused area. Make sure you dont use
any crazy values as the twisted perspective can be very disturbing for the user.
You should also know something about culling planes. Polygons that are too close or too
far from the camera are not rendered at all. Planes that divide the scene in visible and invisible parts
are called near and far culling planes. You can set the position of these planes with
NearFrustrumRange and FarFrustrumRange. Normally only the far culling plane is changed. This
creates one small problem. As the camera moves forward objects suddenly spring into the view as
they get past the far culling plane. To reduce this unwanted effect fog is often used. You can enable
fog in TGLSceneViewer.Buffer together with fog options. Fog has start and end range. Any polygons
between the two borders will change transparency with full opacity at start range and full
transparency at end range. Make the end range of the fog same as far culling range and color of the
fog same as color of scene viewer background.
TGLLightSource
First we should explain what lights can do in GLScene. Without lights the scene would be
dark. Lights illuminate the scene. We can have maximum number of eight lights. Every light except
of parallel lights has a range limit how far it shines. Beyond that distance it has no effect. From the
GLScene beginner's guide, Jan Zizka, 2005