Simple Objects – Arma 3

From Bohemia Interactive Community
Revision as of 14:38, 2 June 2017 by Warka (talk | contribs) (Created page with "==Feature Introduction== Simple Objects is feature that allows creation of objects with very limited simulation, low performance impact and network traffic. Simple objects are...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Feature Introduction

Simple Objects is feature that allows creation of objects with very limited simulation, low performance impact and network traffic. Simple objects are ideal for decorative objects in situations where fully simulated and destructible objects are not required or we can sacrifice full simulation and destruction of some objects to get some performance improvements.

The initial idea for the whole simple object feature was to allow creation of simple p3d shapes, with no extra support and features what so ever. Such objects could be:

  • created - using createSimpleObject with supplied path to p3d and absolute world position
  • positioned - using setPosWorld (absolute world position); there are no land contacts that would allow using setPos or setPosASL like commands
  • deleted - using deleteVehicle
  • retrieved - using allSimpleObjects

This was later extended by providing possibility to create simple object according to the original object config, attach the original object class name as well as possibility to re-texture the simple object (for more info check Simple Object Types sub-section).

Because simple objects have close to no simulation, they have strong advantages and disadvantages. Those must be considered and understood to avoid the pitfalls and make most out of the feature.

PROS

  • Low performance impact - simple object limited simulation is way less demanding, objects outside player's FOV consume very low resources
  • Low network traffic in MP scenarios - simple objects do not need that frequent network updates as simulated objects.

CONS

  • No PhysX and interaction - simple objects are unmovable static objects.
  • No destruction effects and wreck/ruin transitions
  • Overhead - more complex objects like vehicles require many adjustments to look "real"

Simple Object Types

There are 2 types of simple objects based on features they offer and way how they are created. Super-Simple Objects that are meant for some low level scripting and Simple Objects. In general Simple Objects are the way to go as they serve best the majority of use-cases, have more features and in most of the situations provide same performance boost. See the details bellow if you want to know more about the differences between Super-Simple Objects and Simple Objects.

Super-Simple Objects - are simple objects that are created directly from the object shape. They have very limited functionality, do not contain type and cannot be re-textured. The lack of type (=inaccessibility of the original object's config) renders Super-Simple Objects unsuitable for more complex objects like are vehicles. Super-Simple Objects are useful for creating simple objects from objects that do not have config definition.

Simple Objects - represent simple objects created from original object config. These simple objects contain type information which improves scripting capabilities, are automatically adjusted according to the config data and can be re-textured. They are ideal for almost any situation, with exception of objects that do not have config definition where using the Super-Simple Objects is the only possible way or complex objects that support re-texturing but we don't need it, there using Super-Simple Objects can net some significant performance boost (check Performance section). EDEN editor uses these Simple Objects, there is currently no support for Super-Simple Objects in EDEN.

Eden Implementation

No debate the most common use of simple objects is through EDEN. The implementation is very straightforward there:

  1. Place the object
  2. Open object attributes
  3. Go into Object: Special States
  4. Select Simple Object option
Simulated vs. Simple Object
EDEN SimulatedObject.png EDEN SimpleObject.png
* Notice simulated object visual indication - yellow bounding box. * Notice simple object visual indication - grey bounding box.
Simple Object Capability

Not all objects work well as simple objects - some objects require adjustment data (that need to be prepared properly by the content creator), some do not work at all (like units, game logics, weapon holders etc.). Because of that objects need to be whitelisted for the simple object feature to become available. The decision if object is suitable and well prepared for simple object feature is left on the object creator. Whitelisting is done by adding config parameter eden = 1; into SimpleObject class in object config definition. Objects without this parameter will not have the Simple Object option available in EDEN editor.