EQS Node Reference: Tests

Describes how to use Tests within EQS to generate the "best" option.

Windows
MacOS
Linux

Within the Environmental Query System (EQS), a Test can be performed to determine which Item produced from a Generator is the "best" option, given the Context (or frame of reference). There are several Tests that are provided with the Engine that cover a good percentage of use cases, such as "can an Item trace (see) another Location" or "is the distance between and Item and its Context within a specified range".  You can add multiple Tests to a Generator which can be an effective way to narrow down the results, giving you the best possible option. 

If the default Engine Tests do not accomplish what you desire, you can create custom Tests through C++ code.

Common Test Properties

Each Testtype has some unique properties to it that enable you to define how the Test is performed. However, for all Tests there are some common properties that are used to define what the purpose of the Test is for and what to do with the results. For example, is the Test used for filtering out results, or is it being used to score results and weight them, or a combination of both? You can define the Test Purpose among other properties from the Details panel when selecting the Test in the EQS Editor. 

Test Properties

Property

Description

Test Purpose

This defines what additional options are available in the Test and what the test should be used for. 

Property

Description

Filter Only

Used to filter possible results. Items that fail the Test will be removed.

Score Only

Used to score possible results. Items returned are given a weight value.

Filter and Score

Used to filter and score results.

Test Comment

Optional comment or explanation about what the Test is used for. This is useful when the purpose of the Test may not be clear, especially when there are multiple Tests of the same type.

Filter Properties

The following options are available when Test Purpose is set to Filter (or set to Filter and Score):

Filtering is done before scoring to avoid calculating the score on filtered out items.

Property

Description

Bool Match 

This is the value (true or false) to match in order to grant a scoring factor. When performing a Test, not matching this value will not change the score. For example, on a Trace Test, true or false did we hit something? Or for Pathing does a path exist? 

Multiple Context Filter Op

Defines the filtering operator when the Distance To Context returns multiple items. All Pass means all Contexts must pass while Any Pass states at least one Context must pass.

Float Value Min

Filter any value less than or equal to this value. 

This option is only available for Distance and Dot Tests.

Float Value Max

Filter any value greater than or equal to this value. 

This option is only available for Distance and Dot Tests.

Filter Type

Used to change the type of Filter applied to MinimumMaximum, or a Range of values. Any values outside the values specified in the Float Value Min and/or Float Value Max properties will be culled out. 

This option is only available for Distance and Dot Tests.

Score Properites

The following options are available when Test Purpose is set to Score (or set to Filter and Score).

Property

Description

Multiple Context Filter Op

Defines the filtering operator when the Distance To Context returns multiple items. All Pass means all Contexts must pass while Any Pass states at least one Context must pass.

Clamp Min Type

Defines whether a Specified Value should be used to normalize the raw test value before applying the scoring formula, or if the lowest value found (Tested) should be used. 

This option is only available for Distance and Dot Tests.

Clamp Max Type

Defines whether a Specified Value should be used to normalize the raw test value before applying the scoring formula, or if the highest value found (Tested) should be used. 

This option is only available for Distance and Dot Tests.

Scoring Equation

This modifies the score of the Test to adhere to a curve of the ConstantLinearSquareInverse Linear, or Square Root type. 

This option is only available for Distance and Dot Tests.

Scoring Factor

The weight (factor) in which to multiply the normalized score after the scoring equation is applied. This value can be a negative number. 

This option is only available for Distance and Dot Tests.

Normalization Type

Specifies how to determine value span used to normalize score. Absolute (use 0 as the base of normalization range) or Relative to Scores (use the lowest Item score as the base of normalization range). 

This option is only available for Distance and Dot Tests.

Reference Value

Used to normalize Test's results in such a way that the closer a value is to Reference Value, the higher normalized result it will produce. The value farthest away from Reference Value, will be normalized to 0, and all other values in between will get normalized linearly with the distance to Reference Value

This option is only available for Distance and Dot Tests.

Distance

Test_Distance.png

The Distance Test will return the direct distance between the Item and the chosen Distance To property.  If Distance To is more than one location, it averages the results of each distance check. 

Test_Distance_Details-2.png

Property

Description

Test Mode

The method used to test Distance: in 3D space, in 2D as an XY plane, along the Z or Z (absolute) axis.

Distance To

The Context that will be used to measure the distance to.

Dot

Test_Dot.png

The Dot Test calculates the Dot Product of two vectors. These can be Context rotations, or the vector from one point to another. This Test is useful for determining if something is facing something else.

Test_Dot_Details.png

The following properties are available for the Dot Test: 

Property

Description

Line A Mode

This is used to define the direction of the first line used by the Test. There are two methods you use to obtain the direction: 

Property

Description

Rotation

The specified Context will be used as a direction.

Two Points

Direction from Location of one Context to another.

Line B Mode

This is used to define the direction of the second line used by the Test. There are two methods you can use to obtain the direction: 

Property

Description

Rotation

The specified Context will be used as a direction.

Two Points

Direction from Location of one Context to another.

Test Mode

Whether the Test should calculate using the complete 3D vector or just the 2D heading vector of the Line A and Line B vectors.

Absolute Value

This will make the Test return the Absolute Value of the Dot Product (a Dot Product returns a value from -1.0 to 1.0).

Gameplay Tags

Test_Gameplay.png

The Gameplay Tags Test enables you to specify a Tag to query and attempt to match in your Test. 

Test_Gameplay_Details.png

Property

Description

Tag Query to Match

Opens the Gameplay Tags Editor where you can specify the Tags to validate against.

Overlap

Test_Overlap.png

The Overlap Test can be used to determine if an Item (or Items) are within the bounds defined in the properties. 

Test_Overlap_Details.png

Property

Description

Extent X

Shape parameter for the overlap along the X-axis.

Extent Y

Shape parameter for the overlap along the Y-axis.

Extent Z

Shape parameter for the overlap along the Z-axis.

Shape Offset

Offset from the Item location at which to test the overlap. For example, you may need to offset vertically to avoid overlaps with flat ground.

Overlap Channel

Geometry trace channel used for overlap.

Overlap Shape

The shape used for geometry overlap (BoxSphere, or Capsule).

Only Blocking Hits

if set, overlap will only look for blocking hits.

Overlap Complex

If set, overlap will only run on complex collisions.

Pathfinding

Test_Path.png

The Pathfinding Test can be used to determine if a path exists to (or from) the Context, how expensive the path to (or from) the Context is, or how long the path is. 

Test_Path_Details.png

Property

Description

Test Mode

The method in which to apply the Test:

Property

Description

Path Exist

Does the path exist to (or from) the Context

Path Cost

How expensive is the path to (or from) the Context.

Path Length

How long is the path to (or from) the Context.

Context

This is the Context to path to or from.

Path from Context

Should the pathfinder go to (false) or from (true) the Context.

Filter Class

The optional navigation filter to use in pathfinding.

Skip Unreachable

If set, Items with failed paths will be invalidated.

When Test Mode is set to Path Cost or Path Length, the Filter and Score sections of the Details panel change to provide the options typically only available to the common properties outlined for Dot and Distance tests.

Pathfinding Batch

Test_PathBatch.png

The Pathfinding Test can be used to determine if a path exists to (or from) the Context, how expensive the path to (or from) the Context is, or how long the path is. Every processed Context (paths) will be scored depending on the defined Test Mode

Test_PathBatch_Details.png

Property

Description

Test Mode

The method in which to apply the Test:

Property

Description

Path Exist

Does the path exist to (or from) the Context.

Path Cost

How expensive is the path to (or from) the Context.

Path Length

How long is the path to (or from) the Context.

Context

This is the Context that the AI should path to or from.

Path from Context

Should the pathfinder go to (false) or from (true) the Context.

Filter Class

The optional navigation filter to use in pathfinding.

Scan Range Multiplier

The multiplier for max distance between point and Context.

Skip Unreachable

If set, Items with failed paths will be invalidated.

When Test Mode is set to Path Cost or Path Length, the Filter and Score sections of the Details panel change to provide the options typically only available to the common properties outlined for Dot and Distance tests.

Project

Test_Project.png

The Project Test can be used to project the resulting Items onto the NavMesh (and which NavMesh data set to use). 

This will move Items that may be inside walls or blocked, back onto the NavMesh, which can create bunching if a grid line happens to be just beyond the edge of the NavMesh.

Test_Project_Details.png

Property

Description

Trace Mode

This is the shape used for geometry tracing:

Property

Description

Navigation

Does the path exist to (or from) the Context.

Geometry

How expensive is the path to (or from) the Context.

Navigation Filter

The (optional) navigation filter class to used.

Extent X

Shape parameter for trace.

Project Down

Search height is defined below the specified point.

Project Up

Search Height is defined above the specified point.

Post Projection Vertical Offset

This value will be added to the resulting location's Z-axis. 

This can be useful when projecting points on navigation since the Navmesh is just an approximation of Level geometry and items may end up being under collide-able geometry which would, for example, falsify visibility tests.

Trace

Test_Trace-1.png

The Trace Test will trace to (or from) an Item or Context and return if it hit it or not something. You can invert the result using the Filter option, Bool Match. One typical use-case for this type of test is to determine if an enemy can (or cannot) see a Player in the Level. 

Test_Trace_Details-1.png

Property

Description

Trace Channel

This is the channel to perform the trace against. By default, Visibility and Camera are the available options however, additional channels can be added in the Edit Menu > Project Settings > Physics > Trace Channels section of the Project Settings.

Trace Shape

The shape to perform the trace: LineSphereBox, or Capsule.

Trace Complex

Whether the trace should be against the mesh (complex) or just the simple collision.

Only Blocking Hits

Whether the trace uses blocking or non-blocking traces in its results.

Trace from Context

The Context to trace from, such as the Querier, an Item, or any custom Contexts you may have created.

Context

This is the other end of the trace.

Item Height Offset

This will add a Z offset, in cm, to the Item the Test is tracing to (or from).

Context Height Offset

This will add a Z offset, in cm, to the Context the test is tracing to (or from).

Select Skin
Light
Dark

새로운 언리얼 엔진 4 문서 사이트에 오신 것을 환영합니다!

문서 사이트에 대한 의견을 모을 수 있는 피드백 시스템을 포함해서 여러가지 새로운 기능을 준비하고 있습니다. 아래 Documentation Feedback 포럼(영문) 또는 언리얼 엔진 네이버 공식 카페(한글) 중 편하신 곳에 의견이나 문제점을 알려 주세요.

새 시스템이 준비되면 알려 드리겠습니다.

네이버 카페
공식 포럼