Documentation/Articles/Overview of Object Components

From NeoAxis 3D Engine Wiki

Jump to: navigation, search
Go to higher level

Contents

Description

Object components allow a developer to add functionality to any given object of the map. Components are attached to the object.

An example of such object enhancement is the static mesh with added sound, fire effect and a light source.

The SDK contains a number of components to attach to objects. Also, the developer can create his or her own components.

The built-in component types are:

ObjectComponents 01.jpg

Components attached to the object are listed in the Components list of the Entity property group. A component can be attached to an object of any type. Besides, there is an empty type GeneralMapObject designed to be configured with components.

Here you can learn how to add components to the object.

Built-in components

EntityComponent_Example

An example of creating a simple component. The code can be found in the ProjectEntities build, in EntityComponent_Example.cs.

Title Description
_Component
Component Type Component type. Cannot be changed.
Enabled Enable or disable using the component.
Name Component name.
Only For Editor If True is selected, the component can only be used in the editor.
User Data User's custom information. Used for developer's purposes.
Example
ExampleIntegerValue An example of an integer value.
ExampleReferenceToObject An example of a reference to an object.

Billboard

Billboard is a flat image always facing the camera. With a billboard you can implement trees, vegetation, distant objects and various labels.

Title Description
_Component
Component Type Component type. Cannot be changed.
Enabled Enable or disable using the component.
Name Component name.
Only For Editor If True is selected, the component can only be used in the editor.
User Data User's custom information. Used for developer's purposes.
_General
Attach to Body of Physics Model The name of a physical body to attach this component to.
Attach to Bone Attached Object Alias The name of a mesh or component this component attaches to. This property allows a component to attach to a skeleton bone of the attached mesh.
Attach to Bone Name The name of the bone this component attached to. This property allows a component to attach to a skeleton bone of the attached mesh.
Position Offset Additional offset.
Rotation Offset Additional rotation.
Scale Multiplier Additional scaling.
Visible Turn on/off visibility of the component.
Billboard
BillboardType Billboard type. You can select from five values: Point (dotted), OrientedCommon (directed and rotated by the CommonDirection vector), OrientedSelf (directed and rotated by its own vector), PerpendicularCommon (perpendicular to the CommonDirection vector), PerpendicularSelf (perpendicular to its own vector).
Color Billboard color.
CommonDirection Vector directing the billboard. This parameter is only required for OrientedCommon and PerpendicularCommon types.
CommonUpVector Vector describing billboards ‘up’ direction. This parameter is only required for PerpendicularCommon and PerpendicularSelf types.
FadeVelocity Billboard fading speed when the object is invisible.
MaterialName Material name.
RenderingDistance With this parameter you can specify the distance at which billboard is invisible. If this paremeter is set to 0, billboard will always be rendered.
RenderQueueGroup Determines the object rendering order relatively the others. The property only influences on objects with non-transparent materials.
Size Billboard size.
Camera Visibility
CameraVisibleCheck Enable/Disable object visibility check. If this parameter is set to True, object visibility check will be performed. If object’s center is invisible, the object will not be displayed.
CameraVisibleStartOffset Distance at which the object is visible for the camera.

Helper

Helper is an assistant object a developer can use for various purposes. Typical example is obtaining coordinates of a specific place on the map in the code using the name of the helper object placed there.

Helper type components are auxiliary objects and does not have any special properties.

Название Описание
_Component
Component Type Component type. Cannot be changed.
Enabled Enable or disable using the component.
Name Component name.
Only For Editor If True is selected, the component can only be used in the editor.
User Data User's custom information. Used for developer's purposes.
_General
Attach to Body of Physics Model The name of a physical body to attach this component to.
Attach to Bone Attached Object Alias The name of a mesh or component this component attaches to. This property allows a component to attach to a skeleton bone of the attached mesh.
Attach to Bone Name The name of the bone this component attached to. This property allows a component to attach to a skeleton bone of the attached mesh.
Position Offset Additional offset.
Rotation Offset Additional rotation.
Scale Multiplier Additional scaling.
Visible Turn on/off visibility of the component.

Light

Light is a source of light to light up the scene. The type of th light source is specified in the Light Type property.

Title Description
_Component
Component Type Component type. Cannot be changed.
Enabled Enable or disable using the component.
Name Component name.
Only For Editor If True is selected, the component can only be used in the editor.
User Data User's custom information. Used for developer's purposes.
_General
Attach to Body of Physics Model The name of a physical body to attach this component to.
Attach to Bone Attached Object Alias The name of a mesh or component this component attaches to. This property allows a component to attach to a skeleton bone of the attached mesh.
Attach to Bone Name The name of the bone this component attached to. This property allows a component to attach to a skeleton bone of the attached mesh.
Position Offset Additional offset.
Rotation Offset Additional rotation.
Scale Multiplier Additional scaling.
Visible Turn on/off visibility of the component.
Light
AllowStaticLighting Enable/Disable static lighting (lightmap) calculation. If this parameter is set to True this light source will be used when calculating static lighting. Learn more from StaticLightingManager.type.
AttenuationFar Maximum distance of the light source. Can be used only for Spot and Point light sources.
AttenuationNear Distance at which light fade out starts. Can be used only for Spot and Point light sources.
AttenuationPower Light fading factor. Can be used only for Spot and Point light sources.
CastShadows If this parameter is set to true True, all objects blocking this light cast shadows.
CustomShaderParameter Specific parameter for creaters which allows you to send the set value to a shader.
DiffuseColor Diffusive light source.
DiffusePower Power of the source.
FFPAttenuationConstant Definite factor which is a multiplier affecting other light fading parameters (for very old video cards).
FFPAttenuationLinear Linear fading in the rendering in fix pipe mode (for very old video cards).
FFPAttenuationQuadric Quadratic fading in the rendering in fix pipe mode (for very old video cards).
LightType Light source type. You can chose from three values: Point (exact light source), Directional (one-directional light source), Spot (projector).
SpecularColor Light source hotspot color.
SpecularPower The parameter determines specular light intensity on the surface of the illuminated object.
SpotlightFalloff This parameter determines light fading from internal to external cone. The more this value is, the smoother fading is. This parameter works only for the Spot light source type.
SpotlightInnerAngle This parameter determines the inner cone width – the intensity of light concentration near the center. The difference is visible only when the SpotlightFalloff parameter is more than minimal value. If the SpotlightInnerAngle and the SpotlightOuterAngle parameters have the same values, the effect is the same as if the SpotlightFalloff value is minimal.
SpotlightOuterAngle This parameter determines inner cone width of a light ray. The range of values is from 0 to 180, with the value 180 for the widest beam of light.

MapObject

MapObject is a basic type of all map objects. A component of this type allows attaching a map object to another object.

Title Description
_Component
Component Type Component type. Cannot be changed.
Enabled Enable or disable using the component.
Name Component name.
Only For Editor If True is selected, the component can only be used in the editor.
User Data User's custom information. Used for developer's purposes.
_General
Attach to Body of Physics Model The name of a physical body to attach this component to.
Attach to Bone Attached Object Alias The name of a mesh or component this component attaches to. This property allows a component to attach to a skeleton bone of the attached mesh.
Attach to Bone Name The name of the bone this component attached to. This property allows a component to attach to a skeleton bone of the attached mesh.
Position Offset Additional offset.
Rotation Offset Additional rotation.
Scale Multiplier Additional scaling.
Visible Turn on/off visibility of the component.
MapObject
Body of This Object to Attach The name of a physical body to attach the object. The body is attached using a fixed joint.
Destroy When Owner Destroyed Turn on/off destroying of the attached objects if the main object is destroyed. If False is selected the attached object stays on the map after the main object is destroyed.
Object Attached object.
Update Rotation Turn on/off object rotation updating.
Update Scale Turn on/off object scale updating.

Mesh

The Mesh component allows attaching a 3D model to the object.

Title Description
_Component
Component Type Component type. Cannot be changed.
Enabled Enable or disable using the component.
Name Component name.
Only For Editor If True is selected, the component can only be used in the editor.
User Data User's custom information. Used for developer's purposes.
_General
Attach to Body of Physics Model The name of a physical body to attach this component to.
Attach to Bone Attached Object Alias The name of a mesh or component this component attaches to. This property allows a component to attach to a skeleton bone of the attached mesh.
Attach to Bone Name The name of the bone this component attached to. This property allows a component to attach to a skeleton bone of the attached mesh.
Position Offset Additional offset.
Rotation Offset Additional rotation.
Scale Multiplier Additional scaling.
Visible Turn on/off visibility of the component.
Mesh
AnimationTree Animation tree file name.
BoneSlots List of bones, other objects can be attached to.
CastDynamicShadows Turns on/off dynamic shadow generation for this object.
CastStaticShadows Turns on/off static (lightmap) shadow generation for this object.
ForceMaterials With this material you can specify an alternative material for the mesh.
LinkBonesToBodies If this parameter is set to True, bones will be attached to the bodies. Usually it can be used for the ragdolles.
MeshName Mesh file name.
ReceiveStaticShadows This parameter enables shadow rendering at this object. If the parameter is ON, other objects' shadows will be drawn at this object.
RenderingDistance With this parameter you can specify the distance at which the object is invisible. If this parameter is set to 0, object will always be rendered.
RenderingDistanceForShadows With this parameter you can specify the distance at which object's shadow is invisible. If this parameter is set to 0, object's shadow will always be rendered.
RenderingQueueGroup Determine the object rendering order relatively to the others. The property only influences on objects with non-transparent materials.
TransparentObjectSortPriority The priority of transparent objects sorting. It can be set by integer.
UseOwnerScale Enable/Disable the influence of the owner object scaling on given object. If this parameter is set to True, owner scaling is added to the target scaling.
Physics
Collision Turns on/off object's processing when calculating collisions.
CollisionMaterialName Physics material name.This parameter affects physical bodies interaction properties. You can chose the type of material, for example: Metal, Wood, Rubber, Ice. You can add new types of physical materials from Data\Base\Constants\PhysicsSystem.config
CollisionSpecialMeshName The name of special 3D mesh for collisions calculating. With this parameter you can change collision geometry for this object. On collision the mesh which is selected in Meshname parameter will be visible. Use this parameter to speed up calculation of complex physical objects.
CollisionVehicleDrivableSurface Enable/Disable the calculation of physical object as a surface for car movings calculating.

Particle

This component allows adding particle systems to the object. Various special effects like smoke, fire, snow, rain and others can be implemented using particles. Some of these effects are already included in the SDK in the Data\Effects folder.

Title Description
_Component
Component Type Component type. Cannot be changed.
Enabled Enable or disable using the component.
Name Component name.
Only For Editor If True is selected, the component can only be used in the editor.
User Data User's custom information. Used for developer's purposes.
_General
Attach to Body of Physics Model The name of a physical body to attach this component to.
Attach to Bone Attached Object Alias The name of a mesh or component this component attaches to. This property allows a component to attach to a skeleton bone of the attached mesh.
Attach to Bone Name The name of the bone this component attached to. This property allows a component to attach to a skeleton bone of the attached mesh.
Position Offset Additional offset.
Rotation Offset Additional rotation.
Scale Multiplier Additional scaling.
Visible Turn on/off visibility of the component.
Particle
OwnerRotation Enable/Disable the influence of owner object rotation on given object. With this parameter set to True, the parent rotation of the object is added to the target object rotation. owner rotation of the object type is used.
ParticleName Name of the particle.
RenderingDistance With this parameter you can specify the distance at which the particle is invisible. If this paremeter is set to 0, particle will always be rendered.
RenderingDistanceForShadows With this parameter you can specify the distance at which the particle shadow is invisible. If this paremeter is set to 0, particle shadow will always be rendered.
RenderQueueGroup Determines the object rendering order relatively the others. The property only influences on objects with non-transparent materials.
StartTime The moment of particle activating after it’s creation.
UpdateWhenItNotInView If this parameter is set to True, the particle is updated even if it is invisible. This parameter can perceptibly influence on the engine general speed in cases when there are many particle systems on the scene.

Sound

The Sound component allows attaching a source of sound to the object. Therefore, a sound coming from the object can be heard when approaching the object.

Title Description
_Component
Component Type Component type. Cannot be changed.
Enabled Enable or disable using the component.
Name Component name.
Only For Editor If True is selected, the component can only be used in the editor.
User Data User's custom information. Used for developer's purposes.
_General
Attach to Body of Physics Model The name of a physical body to attach this component to.
Attach to Bone Attached Object Alias The name of a mesh or component this component attaches to. This property allows a component to attach to a skeleton bone of the attached mesh.
Attach to Bone Name The name of the bone this component attached to. This property allows a component to attach to a skeleton bone of the attached mesh.
Position Offset Additional offset.
Rotation Offset Additional rotation.
Scale Multiplier Additional scaling.
Visible Turn on/off visibility of the component.
Sound
CalculateSoundVelocity Enable/Disable sound speed calculating. It is necessary for Doppler Effect calculating.
Pitch Sound playback speed coefficient.
Priority This parameter allows to set the priority in sound playback. If a lot of sounds are played simultaneously, sounds with the minimal priority will be turned off, because it is impossible to play all the sounds considering the sound card restrictions.
SoundName Sound file name.
Volume Sound volume.
Misc
MaxDistance Maximal distance at which the object is audible.
MinDistance Minimal distance at which the object is audible.
RolloffLogarithmicFactor Sound fade coefficient for logarifmic mode.
RolloffMode Object fade mode. You can chose between Linear, Logarithmic and Manually modes.