From NeoAxis 3D Engine Wiki
|Language:||English • Russian||Status:||Approved|
Sun is the entity intended for the creation of the sun. Sun.type is an extension of the conventional light Light.type. In addition to standard light source properties, it can display a billboard (flat image, always facing the camera) representing the sun. This entity also allows you to use the light scattering post-effect (God Rays). The sun can only work as a directional light source (Directional Light).
Adding the Sun on a Map
In order to add the sun on a map you need to choose the type Base\Types\Sun in the Object Creation window of the Map Editor and place it on the map.
The position of the object is not important, as the sun object is a directional light source. Thus, you can place it anywhere you want on the map and ajust it's direction using the transformation tool in rotation mode to make it match your needs.
In addition, the sun has a special parameter BillboardOverridePosition, that allows you to redefine the position of the Billboard. If this parameter is different than 0, the Billboard will be drawn at a given point on the camera's position. Otherwise, the position of the Billboard is determined by the rotation of the sun object.
Object properties are the same as the light properties, with additions allowing you to configure the Billboard.
|Components||List of attached components.|
|LogicClass||Reference to the Logic Editor class. Read more about how to work with the Logic Editor class.|
|Tags||User defined information. Defined as key — value pairs. It is used for user's needs.|
|Type||Object type. It can not be changed.|
|AllowDynamicLighting||Enables/disables the dynamic lighting for the light source. If False is chosen, it means that this source will be switched off and can only be used for static lighting. See AllowStaticLighting property.|
|AllowStaticLighting||Enable/disable static lighting for the light source. Specifies whether to use the light for static lighting calculations.(lightmap. Read more about it in StaticLightingManager.type.|
|AttenuationFar||Maximum range of the light source. It's used only for Spot and Point types of lights.|
|AttenuationNear||Distance, at which the light source will start fading. It's used only for Spot and Point types of lights.|
|AttenuationPower||Power of the light source attenuation. It's used only for Spot и Point types of lights.|
|CastShadows||Enable/disable shadow casting for this light source.|
|CustomShaderParameter||Special option for developers, which allows you to pass a specified value to the Shader.|
|DiffuseColor||Diffuse light source color.|
|DiffusePower||The brightness multiplier of the Diffuse Color.|
|Enabled||Enable/disable light source.|
|FFPAttenuationConstant||Constant attenuation coefficient when rendering in fixed pipeline mode (for old graphic cards).|
|FFPAttenuationLinear||The linear attenuation coefficient when rendering in fixed pipeline mode (for old graphic cards).|
|FFPAttenuationQuadric||Quadratic linear attenuation coefficient when rendering in fixed pipeline mode (for old graphic cards).|
|LightType||Type of light. It supports three types of light sources: (Spot), point light source (Point), Directional light source (Directional).|
|SpecularColor||Specular color of the light source.|
|SpecularPower||The brightness multiplier of the specular.|
|SpotlightFalloff||The coefficient of attenuation of the light from the inner to the outer cone. The higher the value, the smoother the attenuation. This parameter is only used for Spot light sources.|
|SpotlightInnerAngle||Parameter that specifies the angle of the inner cone or how light is concentrated at the centre. The difference will be noticeable only when the parameter SpotlightFalloff is set above the minimum value. This parameter is only used for Spot light sources.|
|SpotlightOuterAngle||External angle of the cone source. This parameter is only used for Spot light sources.|
|Position||Object position on the map.|
|Rotation||Object rotation. The angle of rotation is set in degrees.|
|BillboardColor||The color of the Billboard.|
|BillboardOverridePosition||The position of the Billboard. If the value is non-zero, then the Billboard is drawn relatively to the camera's position. Otherwise, the coordinates for drawing the billboard are determined by the rotation of the object.|
|BillboardPower||The brightness of the Billboard|
|BillboardRenderQueueGroup||Specifies the rendering order of the object relatively to other objects.|
|BillboardSize||The size of the Billboard.|
|BillboardTexture||The path of the texture file for the Billboard.|
|AutoVerticalAlignment||Automatical alignment by height mode. Allows to set the value among 4 variants: None (without alignment ), ByBounds (by dimensions), ByBoundsWithRotation (by dimension with possible rotation), ByCenter (by center).|
|Layer||The layer of the map these objects belong to.|