Entity welding – Ylands

From Bohemia Interactive Community
Jump to navigation Jump to search
No edit summary
m (Lou Montana moved page Ylands Entity welding to Ylands:Entity welding: Text replacement - "Ylands " to "Ylands:")
 
(15 intermediate revisions by 2 users not shown)
Line 10: Line 10:
Welding works '''similar''' as object '''grouping''', but it is available only for '''compatible entities'''. Entity weld is '''new game object''' and is threatened in same manner as entity - it can be referenced in script or included in a groups. Weld also provides similar editing options as object group - it is possible to cancel the weld or edit welded entities on individual level.
Welding works '''similar''' as object '''grouping''', but it is available only for '''compatible entities'''. Entity weld is '''new game object''' and is threatened in same manner as entity - it can be referenced in script or included in a groups. Weld also provides similar editing options as object group - it is possible to cancel the weld or edit welded entities on individual level.


==Welding entities==
=== Note: ===
*type '''/collidercount''' to console to see total collider count in the scene.
 
== Welding entities ==
When valid entities are selected, '''Weld entities''' option in object selection menu will become available. This button will initiate the merge process and create Entity weld. If incompatible entities are also selected, they will be automatically excluded from the welding process.
When valid entities are selected, '''Weld entities''' option in object selection menu will become available. This button will initiate the merge process and create Entity weld. If incompatible entities are also selected, they will be automatically excluded from the welding process.


===Entities that cannot be welded===
=== Entities that cannot be welded ===
*Pickable entities (can be disabled)
*Pickable entities (can be disabled)
*Entities with interactions (e.g chairs, doors)
*Entities with interactions (e.g chairs, doors)
Line 20: Line 23:
*Entities referenced in script
*Entities referenced in script


===Example===
=== Example ===
<gallery>
<gallery>
Image:Ylands-Editor-entity welding example1.png|Entities to weld
Image:Ylands-Editor-entity welding example1.png|Entities to weld
Line 26: Line 29:
</gallery>
</gallery>


=Global welding=
= Global welding =
It is also possible to perform '''global welding''', which will divide the world in small chunks and will '''merge all eligible objects''' in each chunks in to one weld. Global welding can be performed via '''Export -> Optimize''' in editor main menu. Depending on the size of map and number of used objects, this process can take up to several minutes or even hours. Optimized scenario then has to be saved in order to preserve newly created entity welds.
It is also possible to perform '''global welding''', which will divide the world in small chunks and will '''merge all eligible objects''' in each chunks in to one weld. Global welding can be performed via '''Export -> Optimize''' in editor main menu. Depending on the size of map and number of used objects, this process can take up to '''several minutes or even hours'''. Optimized scenario then has to be saved in order to preserve newly created entity welds.


<gallery>
<gallery>
Line 33: Line 36:
</gallery>
</gallery>


=Vehicle construction mode=
= Vehicle construction mode =
Entity welding is also utilized for '''optimization of vehicles'''. Vehicles are by default spawned in '''construction mode''' which allows to add object to their structure. Once the vehicle is done, the construction mode has to be manually canceled and entities will get welded.
Entity welding is also utilized for '''optimization of vehicles'''. Vehicles are by default spawned in '''construction mode''' which allows to add object to their structure. Once the vehicle is done, the construction mode has to be manually canceled and entities will get welded.


Line 44: Line 47:


----
----
{{Ylands scripting navbox}}
{{Navbox/Ylands}}
{{DEFAULTSORT:{{#sub:{{PAGENAME}}|7}}}}
 
[[Category: Editor: How To]]

Latest revision as of 16:30, 16 November 2022

Overview

Entity welding is feature, which allows to merge multiple entities in to one. Entities welded together will have new, optimized collision envelope, which leads to better performance in game. Welding large structures consisting from hundreds of individual pieces is resource demanding proces and could take even several minutes to complete, but it is essential optimization tool.

Images below show comparison between welded and unwelded entity, improvement in this particular case is 62%. Note: These are not actual entity colors, but collision visualization.

Welding works similar as object grouping, but it is available only for compatible entities. Entity weld is new game object and is threatened in same manner as entity - it can be referenced in script or included in a groups. Weld also provides similar editing options as object group - it is possible to cancel the weld or edit welded entities on individual level.

Note:

  • type /collidercount to console to see total collider count in the scene.

Welding entities

When valid entities are selected, Weld entities option in object selection menu will become available. This button will initiate the merge process and create Entity weld. If incompatible entities are also selected, they will be automatically excluded from the welding process.

Entities that cannot be welded

  • Pickable entities (can be disabled)
  • Entities with interactions (e.g chairs, doors)
  • Entities with animations (e.g trees, grass)
  • Entities in labels
  • Entities referenced in script

Example

Global welding

It is also possible to perform global welding, which will divide the world in small chunks and will merge all eligible objects in each chunks in to one weld. Global welding can be performed via Export -> Optimize in editor main menu. Depending on the size of map and number of used objects, this process can take up to several minutes or even hours. Optimized scenario then has to be saved in order to preserve newly created entity welds.

Vehicle construction mode

Entity welding is also utilized for optimization of vehicles. Vehicles are by default spawned in construction mode which allows to add object to their structure. Once the vehicle is done, the construction mode has to be manually canceled and entities will get welded.

Switching construction mode on / off is done via vehicle properties panel.