This page has been translated automatically.
Video Tutorials
Interface
Essentials
Advanced
How To
Professional (SIM)
UnigineEditor
Interface Overview
Assets Workflow
Settings and Preferences
Working With Projects
Adjusting Node Parameters
Setting Up Materials
Setting Up Properties
Lighting
Landscape Tool
Sandworm
Using Editor Tools for Specific Tasks
Extending Editor Functionality
Built-in Node Types
Nodes
Objects
Effects
Decals
Light Sources
Geodetics
World Nodes
Sound Objects
Pathfinding Objects
Players
Programming
Fundamentals
Setting Up Development Environment
Usage Examples
C++
C#
UnigineScript
UUSL (Unified UNIGINE Shader Language)
Plugins
File Formats
Materials and Shaders
Rebuilding the Engine Tools
GUI
Double Precision Coordinates
API
Containers
Common Functionality
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
GUI-Related Classes
Math Functionality
Node-Related Classes
Objects-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
IG Plugin
CIGIConnector Plugin
Rendering-Related Classes
Content Creation
Content Optimization
Materials
Material Nodes Library
Miscellaneous
Input
Math
Matrix
Textures
Art Samples
Tutorials
Warning! This version of documentation is OUTDATED, as it describes an older SDK version! Please switch to the documentation for the latest SDK version.
Warning! This version of documentation describes an old SDK version which is no longer supported! Please upgrade to the latest SDK version.

FieldAnimation Class

Warning
The scope of applications for UnigineScript is limited to implementing materials-related logic (material expressions, scriptable materials, brush materials). Do not use UnigineScript as a language for application logic, please consider C#/C++ instead, as these APIs are the preferred ones. Availability of new Engine features in UnigineScript (beyond its scope of applications) is not guaranteed, as the current level of support assumes only fixing critical issues.
Inherits from: Field

This class allows you to create and modify field animation objects.

See also#

  • A set of UnigineScript samples located in the <UnigineSDK>/data/samples/fields/ folder:
    • animation_00
    • animation_01

FieldAnimation Class

Members


static FieldAnimation ( vec3 size ) #

Creates a new field animation node of the specified size:
  • If the field animation is of an ellipse shape, its radius values along the axes must be specified.
  • Otherwise, dimensions of the cube must be specified.

Arguments

  • vec3 size - A size of the field animation along X, Y and Z axes in units.

void setAnimationScale ( float scale ) #

Sets the animation scale value indicating the scale for speed of vegetation swaying.

Arguments

  • float scale - The scale for speed of vegetation swaying value.

float getAnimationScale ( ) #

Returns the animation scale value indicating the scale for speed of vegetation swaying.

Return value

The scale for speed of vegetation swaying value.

void setAttenuation ( float attenuation ) #

Sets an attenuation coefficient value for the field animation that indicates how much animation attenuates starting from the center of the animation field to its edges:
  • By the minimum value of 0, no animation will be visible.
  • The higher the value, the more intensive animation will be at the edges of the animation field.

Arguments

  • float attenuation - An attenuation coefficient value. If a too small value is provided, 1E-6 will be used instead.

float getAttenuation ( ) #

Returns the current attenuation coefficient for the Field Animation that indicates how much animation fades away starting from the center of the animation field to its edges:
  • By the minimum value of 0, no animation will be visible.
  • The higher the value, the more intensive animation will be at the edges of the animation field.

Return value

Current attenuation coefficient value.

void setEllipse ( int ellipse ) #

Transforms a cube-shaped field animation into an ellipse-shaped one or vice versa.

Arguments

  • int ellipse - 1 for the ellipse-shaped field animation, 0 for the cube-shaped one.

int isEllipse ( ) #

Returns a value indicating if the Field Animation is of an ellipse shape.

Return value

1 if the field animation is of an ellipse shape, otherwise - 0.

void setLeaf ( float leaf ) #

Sets a scale for the rotation angle of vegetation leaves inside the animation field.

Arguments

  • float leaf - Scale for the rotation angle of vegetation leaves. If a negative value is provided, 0 will be used instead.

float getLeaf ( ) #

Returns the scale for the rotation angle of vegetation leaves inside the animation field.

Return value

Scale for the rotation angle of vegetation leaves.

void setSize ( vec3 size ) #

Sets an animation field size:
  • If the field animation is of an ellipse shape, its radius values along the axes must be set.
  • Otherwise, dimensions of the cube must be set.

Arguments

  • vec3 size - A new animation field size along the X, Y and Z axes in units. If a negative value is provided, 0 will be used instead.

vec3 getSize ( ) #

Returns the animation field size:
  • If the field animation is of an ellipse shape, its radius values along the axes will be returned.
  • Otherwise, dimensions of the cube will be returned.

Return value

The current animation field size along the X, Y and Z axes in units.

void setStem ( float stem ) #

Sets a scale for movement amplitude of grass and vegetation stems inside the animation field.

Arguments

  • float stem - Scale for movement amplitude of grass and vegetation stems. If a negative value is provided, 0 will be used instead.

float getStem ( ) #

Returns the scale for movement amplitude of grass and vegetation stems inside the animation field.

Return value

Scale for movement amplitude of grass and vegetation stems.

void setWind ( vec3 wind ) #

Sets wind coefficients values that define wind direction inside the animation field.

Arguments

  • vec3 wind - Wind coefficients values along the X, Y and Z directions.

vec3 getWind ( ) #

Returns the wind coefficients values that define wind direction inside the animation field.

Return value

Current wind coefficients values along the X, Y, and Z directions.

static int type ( ) #

Returns the type of the object.

Return value

FieldAnimation type identifier.
Last update: 2022-03-10
Build: ()